{"_id":"parseley","_rev":"3983336","name":"parseley","description":"CSS selectors parser","dist-tags":{"latest":"0.12.1"},"maintainers":[{"name":"killy.mxi","email":""}],"time":{"modified":"2025-09-01T02:02:49.000Z","created":"2021-04-05T14:53:23.454Z","0.12.1":"2023-04-22T10:52:46.564Z","0.12.0":"2023-02-23T17:13:41.010Z","0.11.0":"2022-08-19T13:20:35.932Z","0.10.0":"2022-01-29T17:54:22.218Z","0.9.1":"2021-12-06T16:50:52.421Z","0.9.0":"2021-12-05T14:49:43.352Z","0.8.0":"2021-11-10T22:02:44.051Z","0.7.0":"2021-04-18T13:20:03.029Z","0.6.0":"2021-04-06T14:43:47.792Z","0.5.0":"2021-04-05T14:53:23.454Z"},"users":{},"author":{"name":"KillyMXI"},"repository":{"type":"git","url":"git+https://github.com/mxxii/parseley.git"},"versions":{"0.12.1":{"name":"parseley","version":"0.12.1","description":"CSS selectors parser","keywords":["CSS","selectors","parser","AST","serializer","specificity"],"repository":{"type":"git","url":"git+https://github.com/mxxii/parseley.git"},"bugs":{"url":"https://github.com/mxxii/parseley/issues"},"homepage":"https://github.com/mxxii/parseley","author":{"name":"KillyMXI"},"funding":"https://ko-fi.com/killymxi","license":"MIT","exports":{"import":"./lib/parseley.mjs","require":"./lib/parseley.cjs"},"type":"module","main":"./lib/parseley.cjs","module":"./lib/parseley.mjs","types":"./lib/parseley.d.ts","sideEffects":false,"scripts":{"build:deno":"denoify","build:docs":"typedoc --plugin typedoc-plugin-markdown","build:rollup":"rollup -c","build:types":"tsc --declaration --emitDeclarationOnly","build":"npm run clean && npm run build:rollup && npm run build:types && npm run build:docs && npm run build:deno","checkAll":"npm run lint && npm test","clean":"rimraf lib","example":"node ./example/example.mjs","lint:eslint":"eslint .","lint:md":"markdownlint-cli2","lint":"npm run lint:eslint && npm run lint:md","prepublishOnly":"npm run build && npm run checkAll","test":"ava --timeout=20s"},"dependencies":{"leac":"^0.6.0","peberminta":"^0.9.0"},"devDependencies":{"@rollup/plugin-typescript":"^11.1.0","@tsconfig/node14":"^1.0.3","@types/node":"^14.18.42","@typescript-eslint/eslint-plugin":"^5.59.0","@typescript-eslint/parser":"^5.59.0","ava":"^5.2.0","denoify":"^1.5.3","eslint":"^8.39.0","eslint-plugin-jsonc":"^2.7.0","eslint-plugin-tsdoc":"^0.2.17","markdownlint-cli2":"^0.7.0","rimraf":"^5.0.0","rollup":"^2.79.1","rollup-plugin-cleanup":"^3.2.1","ts-node":"^10.9.1","tslib":"^2.5.0","typedoc":"~0.23.28","typedoc-plugin-markdown":"~3.14.0","typescript":"~4.9.5"},"ava":{"extensions":{"ts":"module"},"files":["test/**/*"],"nodeArguments":["--loader=ts-node/esm","--experimental-specifier-resolution=node"],"verbose":true},"denoify":{"out":"./deno"},"gitHead":"a4b46697101eed0c4d0e3a81f5a5f45f64ee249b","_id":"parseley@0.12.1","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"shasum":"4afd561d50215ebe259e3e7a853e62f600683aef","size":9777,"noattachment":false,"key":"/parseley/-/parseley-0.12.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/parseley/download/parseley-0.12.1.tgz"},"_npmUser":{"name":"killy.mxi","email":"killy.mxi@gmail.com"},"directories":{},"maintainers":[{"name":"killy.mxi","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parseley_0.12.1_1682160766335_0.7841395559970434"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-04-22T10:52:46.564Z","publish_time":1682160766564,"_cnpm_publish_time":1682160766564},"0.12.0":{"name":"parseley","version":"0.12.0","description":"CSS selectors parser","keywords":["CSS","selectors","parser","AST","serializer","specificity"],"repository":{"type":"git","url":"git+https://github.com/mxxii/parseley.git"},"bugs":{"url":"https://github.com/mxxii/parseley/issues"},"homepage":"https://github.com/mxxii/parseley","author":{"name":"KillyMXI"},"funding":"https://ko-fi.com/killymxi","license":"MIT","exports":{"import":"./lib/parseley.mjs","require":"./lib/parseley.cjs"},"type":"module","main":"./lib/parseley.cjs","module":"./lib/parseley.mjs","types":"./lib/parseley.d.ts","sideEffects":false,"scripts":{"build:deno":"denoify","build:docs":"typedoc","build:rollup":"rollup -c","build:types":"tsc --declaration --emitDeclarationOnly","build":"npm run clean && npm run build:rollup && npm run build:types && npm run build:docs && npm run build:deno","checkAll":"npm run lint && npm test","clean":"rimraf lib","example":"node ./example/example.cjs","lint:eslint":"eslint .","lint:md":"markdownlint-cli2","lint":"npm run lint:eslint && npm run lint:md","prepublishOnly":"npm run build && npm run checkAll","test":"ava --timeout=20s"},"dependencies":{"leac":"^0.6.0","peberminta":"^0.9.0"},"devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@tsconfig/node14":"^1.0.3","@types/node":"^14.18.36","@typescript-eslint/eslint-plugin":"^5.53.0","@typescript-eslint/parser":"^5.53.0","ava":"^5.2.0","denoify":"^1.4.10","eslint":"^8.34.0","eslint-plugin-jsonc":"^2.6.0","eslint-plugin-tsdoc":"^0.2.17","markdownlint-cli2":"^0.6.0","rimraf":"^4.1.2","rollup":"^2.79.1","rollup-plugin-cleanup":"^3.2.1","ts-node":"^10.9.1","tslib":"^2.5.0","typedoc":"~0.23.25","typedoc-plugin-markdown":"~3.14.0","typescript":"~4.9.5"},"ava":{"extensions":{"ts":"module"},"files":["test/**/*"],"nodeArguments":["--loader=ts-node/esm","--experimental-specifier-resolution=node"],"verbose":true},"denoify":{"out":"./deno"},"gitHead":"1e70c4f9c4a704db3c969bce089e0e8f606f7875","_id":"parseley@0.12.0","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"shasum":"e0dc6b0f99201d136ce756d5f3cec9461ad09830","size":9668,"noattachment":false,"key":"/parseley/-/parseley-0.12.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parseley/download/parseley-0.12.0.tgz"},"_npmUser":{"name":"killy.mxi","email":"killy.mxi@gmail.com"},"directories":{},"maintainers":[{"name":"killy.mxi","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parseley_0.12.0_1677172420867_0.34747053437560527"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-02-23T17:13:41.010Z","publish_time":1677172421010,"_cnpm_publish_time":1677172421010},"0.11.0":{"name":"parseley","version":"0.11.0","description":"CSS selectors parser","keywords":["CSS","selectors","parser","AST","serializer","specificity"],"repository":{"type":"git","url":"git+https://github.com/mxxii/parseley.git"},"bugs":{"url":"https://github.com/mxxii/parseley/issues"},"homepage":"https://github.com/mxxii/parseley","author":{"name":"KillyMXI"},"funding":"https://ko-fi.com/killymxi","license":"MIT","exports":{"import":"./lib/parseley.mjs","require":"./lib/parseley.cjs"},"type":"module","main":"./lib/parseley.cjs","module":"./lib/parseley.mjs","types":"./lib/parseley.d.ts","sideEffects":false,"scripts":{"build:deno":"denoify","build:docs":"typedoc","build:rollup":"rollup -c","build:types":"tsc --declaration --emitDeclarationOnly","build":"npm run clean && npm run build:rollup && npm run build:types && npm run build:docs && npm run build:deno","checkAll":"npm run lint && npm test","clean":"rimraf lib","example":"node ./example/example.cjs","lint:eslint":"eslint .","lint:md":"markdownlint-cli2","lint":"npm run lint:eslint && npm run lint:md","prepublishOnly":"npm run build && npm run checkAll","test":"ava --timeout=20s"},"dependencies":{"leac":"^0.6.0","peberminta":"^0.8.0"},"devDependencies":{"@rollup/plugin-typescript":"^8.3.4","@tsconfig/node14":"^1.0.3","@types/node":"^14.18.23","@typescript-eslint/eslint-plugin":"^5.33.1","@typescript-eslint/parser":"^5.33.1","ava":"^4.3.1","denoify":"^1.0.1","eslint":"^8.22.0","eslint-plugin-jsonc":"^2.4.0","eslint-plugin-tsdoc":"^0.2.16","markdownlint-cli2":"^0.5.1","rimraf":"^3.0.2","rollup":"^2.78.0","rollup-plugin-cleanup":"^3.2.1","ts-node":"^10.9.1","tslib":"^2.4.0","typedoc":"~0.23.10","typedoc-plugin-markdown":"~3.13.4","typescript":"~4.7.4"},"ava":{"extensions":{"ts":"module"},"files":["test/**/*"],"nodeArguments":["--loader=ts-node/esm","--experimental-specifier-resolution=node"],"verbose":true},"denoify":{"out":"./deno","ports":{"leac":"https://deno.land/x/leac/leac.ts","peberminta":"https://deno.land/x/peberminta/core.ts"}},"gitHead":"febd0af5b32b3dc05622bdbc3f335f1aa78f8c4c","_id":"parseley@0.11.0","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"shasum":"1ff817c829a02fcc214c9cc0d96b126d772ee814","size":8857,"noattachment":false,"key":"/parseley/-/parseley-0.11.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parseley/download/parseley-0.11.0.tgz"},"_npmUser":{"name":"killy.mxi","email":"killy.mxi@gmail.com"},"directories":{},"maintainers":[{"name":"killy.mxi","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parseley_0.11.0_1660915235712_0.8499702680174042"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-08-19T14:25:31.239Z","publish_time":1660915235932,"_cnpm_publish_time":1660915235932},"0.10.0":{"name":"parseley","version":"0.10.0","description":"CSS selectors parser","keywords":["CSS","selectors","parser","AST","serializer","specificity"],"repository":{"type":"git","url":"git+https://github.com/mxxii/parseley.git"},"bugs":{"url":"https://github.com/mxxii/parseley/issues"},"homepage":"https://github.com/mxxii/parseley","author":{"name":"KillyMXI"},"funding":"https://ko-fi.com/killymxi","license":"MIT","exports":{"import":"./lib/parseley.mjs","require":"./lib/parseley.cjs"},"type":"module","main":"./lib/parseley.cjs","module":"./lib/parseley.mjs","types":"./lib/parseley.d.ts","sideEffects":false,"scripts":{"build:deno":"denoify","build:docs":"typedoc","build:rollup":"rollup -c","build:types":"tsc --declaration --emitDeclarationOnly","build":"npm run clean && npm run build:rollup && npm run build:types && npm run build:docs && npm run build:deno","checkAll":"npm run lint && npm test","clean":"rimraf lib","example":"node ./example/example.cjs","lint:eslint":"eslint .","lint:md":"markdownlint-cli2","lint":"npm run lint:eslint && npm run lint:md","prepublishOnly":"npm run build && npm run checkAll","test":"ava --timeout=20s"},"dependencies":{"leac":"^0.5.1","peberminta":"^0.6.0"},"devDependencies":{"@rollup/plugin-typescript":"^8.3.0","@tsconfig/node12":"^1.0.9","@types/node":"^12.20.42","@typescript-eslint/eslint-plugin":"^5.10.1","@typescript-eslint/parser":"^5.10.1","ava":"^4.0.1","denoify":"^0.11.0","eslint":"^8.8.0","eslint-plugin-jsonc":"^2.1.0","eslint-plugin-tsdoc":"^0.2.14","markdownlint-cli2":"^0.4.0","rimraf":"^3.0.2","rollup":"^2.66.1","rollup-plugin-cleanup":"^3.2.1","ts-node":"^10.4.0","tslib":"^2.3.1","typedoc":"^0.22.11","typedoc-plugin-markdown":"^3.11.12","typescript":"^4.5.5"},"ava":{"extensions":{"ts":"module"},"files":["test/**/*"],"nodeArguments":["--loader=ts-node/esm","--experimental-specifier-resolution=node"],"verbose":true},"denoify":{"out":"./deno","ports":{"leac":"https://deno.land/x/leac/leac.ts","peberminta":"https://deno.land/x/peberminta/core.ts"}},"gitHead":"5b4dcb905504361aadd61c6620b5c255fc314f98","_id":"parseley@0.10.0","_nodeVersion":"12.22.6","_npmVersion":"6.14.15","dist":{"shasum":"639d95ed2c188b7de0a6d7aff59372fa8cff836a","size":8787,"noattachment":false,"key":"/parseley/-/parseley-0.10.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parseley/download/parseley-0.10.0.tgz"},"_npmUser":{"name":"killy.mxi","email":"killy.mxi@gmail.com"},"directories":{},"maintainers":[{"name":"killy.mxi","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parseley_0.10.0_1643478862078_0.027401601580463897"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-01-29T17:54:27.274Z","publish_time":1643478862218,"_cnpm_publish_time":1643478862218},"0.9.1":{"name":"parseley","version":"0.9.1","description":"CSS selectors parser","keywords":["CSS","selectors","parser","AST","serializer","specificity"],"repository":{"type":"git","url":"git+https://github.com/mxxii/parseley.git"},"bugs":{"url":"https://github.com/mxxii/parseley/issues"},"homepage":"https://github.com/mxxii/parseley","author":{"name":"KillyMXI"},"funding":"https://ko-fi.com/killymxi","license":"MIT","exports":{"import":"./lib/parseley.mjs","require":"./lib/parseley.cjs"},"type":"module","main":"./lib/parseley.cjs","module":"./lib/parseley.mjs","types":"./lib/parseley.d.ts","sideEffects":false,"scripts":{"build:deno":"denoify","build:docs":"typedoc","build:rollup":"rollup -c","build:types":"tsc --declaration --emitDeclarationOnly","build":"npm run clean && npm run build:rollup && npm run build:types && npm run build:docs && npm run build:deno","checkAll":"npm run lint && npm test","clean":"rimraf lib","example":"node ./example/example.cjs","lint:eslint":"eslint .","lint:md":"markdownlint-cli2","lint":"npm run lint:eslint && npm run lint:md","prepublishOnly":"npm run build && npm run checkAll","test":"ava --timeout=20s"},"dependencies":{"leac":"^0.5.0","peberminta":"^0.5.4"},"devDependencies":{"@rollup/plugin-typescript":"^8.3.0","@tsconfig/node12":"^1.0.9","@types/node":"^12.20.37","@typescript-eslint/eslint-plugin":"^5.5.0","@typescript-eslint/parser":"^5.5.0","ava":"^3.15.0","denoify":"^0.10.5","eslint":"^8.4.0","eslint-plugin-jsonc":"^2.0.0","eslint-plugin-tsdoc":"^0.2.14","markdownlint-cli2":"^0.3.2","rimraf":"^3.0.2","rollup":"^2.60.2","rollup-plugin-cleanup":"^3.2.1","ts-node":"^10.4.0","tslib":"^2.3.1","typedoc":"^0.22.10","typedoc-plugin-markdown":"^3.11.7","typescript":"^4.5.2"},"ava":{"extensions":{"ts":"module"},"files":["test/**/*"],"nodeArguments":["--loader=ts-node/esm","--experimental-specifier-resolution=node"],"nonSemVerExperiments":{"configurableModuleFormat":true},"verbose":true},"denoify":{"out":"./deno","ports":{"leac":"https://deno.land/x/leac/leac.ts","peberminta":"https://deno.land/x/peberminta/core.ts"}},"gitHead":"ec4bcf5bec851274045874aaa8e53b520694bf65","_id":"parseley@0.9.1","_nodeVersion":"12.22.6","_npmVersion":"6.14.15","dist":{"shasum":"e13d1259dcaac3504ad2846aa904bc6c83c90c73","size":8776,"noattachment":false,"key":"/parseley/-/parseley-0.9.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/parseley/download/parseley-0.9.1.tgz"},"_npmUser":{"name":"killy.mxi","email":"killy.mxi@gmail.com"},"directories":{},"maintainers":[{"name":"killy.mxi","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parseley_0.9.1_1638809452232_0.030683681208978797"},"_hasShrinkwrap":false,"publish_time":1638809452421,"_cnpm_publish_time":1638809452421,"_cnpmcore_publish_time":"2021-12-16T18:33:46.170Z"},"0.9.0":{"name":"parseley","version":"0.9.0","description":"CSS selectors parser","keywords":["CSS","selectors","parser","AST","serializer","specificity"],"repository":{"type":"git","url":"git+https://github.com/mxxii/parseley.git"},"bugs":{"url":"https://github.com/mxxii/parseley/issues"},"homepage":"https://github.com/mxxii/parseley","author":{"name":"KillyMXI"},"funding":"https://ko-fi.com/killymxi","license":"MIT","exports":{"import":"./lib/parseley.mjs","require":"./lib/parseley.cjs"},"type":"module","main":"./lib/parseley.cjs","module":"./lib/parseley.mjs","types":"./lib/parseley.d.ts","sideEffects":false,"scripts":{"build:deno":"denoify","build:docs":"typedoc","build:rollup":"rollup -c","build:types":"tsc --declaration --emitDeclarationOnly","build":"npm run clean && npm run build:rollup && npm run build:types && npm run build:docs && npm run build:deno","checkAll":"npm run lint && npm test","clean":"rimraf lib","example":"node ./example/example.cjs","lint:eslint":"eslint .","lint:md":"markdownlint-cli2","lint":"npm run lint:eslint && npm run lint:md","prepublishOnly":"npm run build && npm run checkAll","test":"ava --timeout=20s"},"dependencies":{"leac":"^0.5.0","peberminta":"^0.5.2"},"devDependencies":{"@rollup/plugin-typescript":"^8.3.0","@tsconfig/node12":"^1.0.9","@types/node":"^12.20.37","@typescript-eslint/eslint-plugin":"^5.5.0","@typescript-eslint/parser":"^5.5.0","ava":"^3.15.0","denoify":"^0.10.5","eslint":"^8.4.0","eslint-plugin-jsonc":"^2.0.0","eslint-plugin-tsdoc":"^0.2.14","markdownlint-cli2":"^0.3.2","rimraf":"^3.0.2","rollup":"^2.60.2","rollup-plugin-terser":"^7.0.2","ts-node":"^10.4.0","tslib":"^2.3.1","typedoc":"^0.22.10","typedoc-plugin-markdown":"^3.11.7","typescript":"^4.5.2"},"ava":{"extensions":{"ts":"module"},"files":["test/**/*"],"nodeArguments":["--loader=ts-node/esm","--experimental-specifier-resolution=node"],"nonSemVerExperiments":{"configurableModuleFormat":true},"verbose":true},"denoify":{"out":"./deno","ports":{"leac":"https://deno.land/x/leac/leac.ts","peberminta":"https://deno.land/x/peberminta/core.ts"}},"gitHead":"c74d63cfe98558b37b7cc9d6a3d54e3a02d2d071","_id":"parseley@0.9.0","_nodeVersion":"12.22.6","_npmVersion":"6.14.15","dist":{"shasum":"8c658b8c37f6c852cd43e1c28983d195b1cea8a7","size":8587,"noattachment":false,"key":"/parseley/-/parseley-0.9.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parseley/download/parseley-0.9.0.tgz"},"_npmUser":{"name":"killy.mxi","email":"killy.mxi@gmail.com"},"directories":{},"maintainers":[{"name":"killy.mxi","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parseley_0.9.0_1638715783086_0.2393660736938379"},"_hasShrinkwrap":false,"publish_time":1638715783352,"_cnpm_publish_time":1638715783352,"_cnpmcore_publish_time":"2021-12-16T18:33:46.361Z"},"0.8.0":{"name":"parseley","version":"0.8.0","description":"CSS selectors parser, based on nearley","keywords":["CSS","selectors","parser","AST","serializer","specificity"],"repository":{"type":"git","url":"git+https://github.com/mxxii/parseley.git"},"bugs":{"url":"https://github.com/mxxii/parseley/issues"},"homepage":"https://github.com/mxxii/parseley","author":{"name":"KillyMXI"},"funding":"https://ko-fi.com/killymxi","license":"MIT","exports":{"import":"./lib/parseley.mjs","require":"./lib/parseley.cjs"},"type":"module","main":"./lib/parseley.cjs","module":"./lib/parseley.mjs","types":"./lib/parseley.d.ts","scripts":{"build:docs":"typedoc","build:rollup":"rollup -c","build:types":"tsc --declaration --emitDeclarationOnly && rimraf ./lib/grammar.d.ts","build":"npm run nearley && npm run clean && npm run build:rollup && npm run build:types && npm run build:docs","checkAll":"npm run lint && npm test","clean":"rimraf lib","example":"node ./example/example.cjs","lint:eslint":"eslint .","lint:md":"markdownlint-cli2","lint":"npm run lint:eslint && npm run lint:md","nearley":"nearleyc ./src/grammar.ne -o ./src/grammar.ts","prepublishOnly":"npm run build && npm run checkAll","pretest":"npm run nearley","test":"ava --timeout=20s"},"dependencies":{"moo":"^0.5.1","nearley":"^2.20.1"},"devDependencies":{"@rollup/plugin-typescript":"^8.3.0","@tsconfig/node12":"^1.0.9","@types/moo":"^0.5.5","@types/nearley":"^2.11.2","@types/node":"^12.20.37","@typescript-eslint/eslint-plugin":"^5.3.1","@typescript-eslint/parser":"^5.3.1","ava":"^3.15.0","eslint":"^7.32.0","eslint-plugin-jsonc":"^2.0.0","eslint-plugin-tsdoc":"^0.2.14","markdownlint-cli2":"^0.1.3","rimraf":"^3.0.2","rollup":"^2.59.0","ts-node":"^9.1.1","tslib":"^2.3.1","typedoc":"^0.22.8","typedoc-plugin-markdown":"^3.11.3","typescript":"^4.4.4"},"ava":{"extensions":["ts"],"files":["test/**/*"],"require":["ts-node/register"],"environmentVariables":{"TS_NODE_FILES":"true"},"verbose":true},"gitHead":"ffa882766b1aadecf2ac9a23424348c90e25b150","_id":"parseley@0.8.0","_nodeVersion":"12.22.6","_npmVersion":"6.14.15","dist":{"shasum":"acb2550278e360527b0d9a868f0e30e5beaf93d2","size":8828,"noattachment":false,"key":"/parseley/-/parseley-0.8.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parseley/download/parseley-0.8.0.tgz"},"_npmUser":{"name":"killy.mxi","email":"killy.mxi@gmail.com"},"directories":{},"maintainers":[{"name":"killy.mxi","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parseley_0.8.0_1636581763863_0.2595927599089862"},"_hasShrinkwrap":false,"publish_time":1636581764051,"_cnpm_publish_time":1636581764051,"_cnpmcore_publish_time":"2021-12-16T18:33:46.809Z"},"0.7.0":{"name":"parseley","version":"0.7.0","description":"CSS selectors parser, based on nearley","keywords":["CSS","selectors","parser","AST","serializer","specificity"],"repository":{"type":"git","url":"git+https://github.com/mxxii/parseley.git"},"bugs":{"url":"https://github.com/mxxii/parseley/issues"},"homepage":"https://github.com/mxxii/parseley","author":{"name":"KillyMXI"},"funding":"https://ko-fi.com/killymxi","license":"MIT","exports":{"import":"./lib/parseley.mjs","require":"./lib/parseley.cjs"},"type":"module","main":"./lib/parseley.cjs","module":"./lib/parseley.mjs","types":"./lib/parseley.d.ts","scripts":{"build:docs":"typedoc","build:rollup":"rollup -c","build:types":"tsc -d --emitDeclarationOnly --declarationDir ./lib && rimraf ./lib/grammar.d.ts","build":"npm run nearley && npm run clean && npm run build:rollup && npm run build:types && npm run build:docs","checkAll":"npm run lint && npm test","clean":"rimraf lib","example":"node ./example/example.cjs","lint:eslint":"eslint .","lint:md":"markdownlint --ignore-path .gitignore .","lint":"npm run lint:eslint && npm run lint:md","nearley":"nearleyc ./src/grammar.ne -o ./src/grammar.ts","prepublishOnly":"npm run build && npm run checkAll","pretest":"npm run nearley","test":"ava"},"dependencies":{"moo":"^0.5.1","nearley":"^2.20.1"},"devDependencies":{"@rollup/plugin-typescript":"^8.2.1","@tsconfig/node10":"^1.0.7","@types/moo":"^0.5.4","@types/nearley":"^2.11.1","@typescript-eslint/eslint-plugin":"^4.22.0","@typescript-eslint/parser":"^4.22.0","ava":"^3.15.0","eslint":"^7.24.0","eslint-plugin-jsonc":"^1.2.1","eslint-plugin-tsdoc":"^0.2.12","markdownlint-cli":"^0.27.1","rimraf":"^3.0.2","rollup":"^2.45.2","ts-node":"^9.1.1","tslib":"^2.2.0","typedoc":"^0.20.35","typedoc-plugin-markdown":"^3.7.0","typescript":"^4.2.4"},"ava":{"extensions":["ts"],"files":["test/**/*"],"require":["ts-node/register"],"environmentVariables":{"TS_NODE_FILES":"true"},"verbose":true},"gitHead":"bf5ae7cb9037a01ff12c902f547c5290f9d103ea","_id":"parseley@0.7.0","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"shasum":"9949e3a0ed05c5072adb04f013c2810cf49171a8","size":8775,"noattachment":false,"key":"/parseley/-/parseley-0.7.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parseley/download/parseley-0.7.0.tgz"},"_npmUser":{"name":"killy.mxi","email":"killy.mxi@gmail.com"},"directories":{},"maintainers":[{"name":"killy.mxi","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parseley_0.7.0_1618752002861_0.39777707786439964"},"_hasShrinkwrap":false,"publish_time":1618752003029,"_cnpm_publish_time":1618752003029,"_cnpmcore_publish_time":"2021-12-16T18:33:47.105Z"},"0.6.0":{"name":"parseley","version":"0.6.0","description":"CSS selectors parser, based on nearley","keywords":["CSS","selectors","parser","AST","serializer","specificity"],"repository":{"type":"git","url":"git+https://github.com/mxxii/parseley.git"},"bugs":{"url":"https://github.com/mxxii/parseley/issues"},"homepage":"https://github.com/mxxii/parseley","author":{"name":"KillyMXI"},"funding":"https://ko-fi.com/killymxi","license":"MIT","main":"index.js","scripts":{"checkAll":"npm run lint && npm test","lint:eslint":"eslint .","lint:md":"markdownlint --ignore-path .gitignore .","lint":"npm run lint:eslint && npm run lint:md","nearley":"nearleyc ./lib/grammar.ne -o ./lib/grammar.js","prepublishOnly":"npm run checkAll","pretest":"npm run nearley","test":"ava"},"dependencies":{"moo":"^0.5.1","nearley":"^2.20.1"},"devDependencies":{"ava":"^3.15.0","eslint":"^7.23.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-jsonc":"^1.2.1","markdownlint-cli":"^0.27.1"},"ava":{"files":["test/**/*"],"verbose":true},"gitHead":"0e9a85d6a53176a6dbf7c0f6669ddc2c8752a9fc","_id":"parseley@0.6.0","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"shasum":"743037ac1899e1a17cc3854e854787a7b45ee595","size":7017,"noattachment":false,"key":"/parseley/-/parseley-0.6.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parseley/download/parseley-0.6.0.tgz"},"_npmUser":{"name":"killy.mxi","email":"killy.mxi@gmail.com"},"directories":{},"maintainers":[{"name":"killy.mxi","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parseley_0.6.0_1617720227456_0.6218221835531501"},"_hasShrinkwrap":false,"publish_time":1617720227792,"_cnpm_publish_time":1617720227792,"_cnpmcore_publish_time":"2021-12-16T18:33:47.349Z"},"0.5.0":{"name":"parseley","version":"0.5.0","description":"CSS selectors parser, based on nearley","keywords":["CSS","selectors","parser","AST","serializer","specificity"],"repository":{"type":"git","url":"git+https://github.com/mxxii/parseley.git"},"bugs":{"url":"https://github.com/mxxii/parseley/issues"},"homepage":"https://github.com/mxxii/parseley","author":{"name":"KillyMXI"},"funding":"https://ko-fi.com/killymxi","license":"MIT","main":"index.js","scripts":{"checkAll":"npm run lint && npm test","lint:eslint":"eslint .","lint:md":"markdownlint --ignore-path .gitignore .","lint":"npm run lint:eslint && npm run lint:md","nearley":"nearleyc ./lib/grammar.ne -o ./lib/grammar.js","prepublishOnly":"npm run checkAll","pretest":"npm run nearley","test":"ava"},"dependencies":{"moo":"^0.5.1","nearley":"^2.20.1"},"devDependencies":{"ava":"^3.15.0","eslint":"^7.23.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-jsonc":"^1.2.1","markdownlint-cli":"^0.27.1"},"ava":{"files":["test/**/*"],"verbose":true},"gitHead":"2a795a2986705f5116f47d907af5d783eda52e4c","_id":"parseley@0.5.0","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"shasum":"6b25a654a0b51b36148c2969a7da55f94b7f8d46","size":6263,"noattachment":false,"key":"/parseley/-/parseley-0.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parseley/download/parseley-0.5.0.tgz"},"_npmUser":{"name":"killy.mxi","email":"killy.mxi@gmail.com"},"directories":{},"maintainers":[{"name":"killy.mxi","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parseley_0.5.0_1617634403300_0.7981243640082138"},"_hasShrinkwrap":false,"publish_time":1617634403454,"_cnpm_publish_time":1617634403454,"_cnpmcore_publish_time":"2021-12-16T18:33:47.561Z"}},"readme":"# parseley\n\n![lint status badge](https://github.com/mxxii/parseley/workflows/lint/badge.svg)\n![test status badge](https://github.com/mxxii/parseley/workflows/test/badge.svg)\n[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/mxxii/parseley/blob/main/LICENSE)\n[![npm](https://img.shields.io/npm/v/parseley?logo=npm)](https://www.npmjs.com/package/parseley)\n[![npm](https://img.shields.io/npm/dw/parseley?color=informational&logo=npm)](https://www.npmjs.com/package/parseley)\n[![deno](https://img.shields.io/badge/deno.land%2Fx%2F-parseley-informational?logo=deno)](https://deno.land/x/parseley)\n\n**Par**ser for CSS **sele**ctors.\n\n----\n\n\n## Features\n\n* Convert CSS selector strings into objects that are easy to work with;\n\n* Serialize back if needed;\n\n* Get specificity for free.\n\n\n## Changelog\n\nAvailable here: [CHANGELOG.md](https://github.com/mxxii/parseley/blob/main/CHANGELOG.md).\n\n\n## Install\n\n### Node\n\n```shell\n> npm i parseley\n```\n\n```typescript\nimport * as parseley from 'parseley';\n```\n\n### Deno\n\n```typescript\nimport * as parseley from 'https://deno.land/x/parseley@.../parseley.ts';\n```\n\n\n## Usage example\n\n```js\nimport { parse1, serialize, normalize } from 'parseley';\nimport { inspect } from 'node:util';\n\nconst str = 'div#id1 > .class2.class1[attr1]';\n\nconst ast = parse1(str);\nconsole.log(inspect(ast, { breakLength: 45, depth: null }));\n\nconst serialized = serialize(ast);\nconsole.log(`Serialized: '${serialized}'`);\n\nnormalize(ast);\nconst normalized = serialize(ast);\nconsole.log(`Normalized: '${normalized}'`);\n```\n\n<details><summary>Example output</summary>\n\n```text\n{\n  type: 'compound',\n  list: [\n    {\n      type: 'class',\n      name: 'class2',\n      specificity: [ 0, 1, 0 ]\n    },\n    {\n      type: 'class',\n      name: 'class1',\n      specificity: [ 0, 1, 0 ]\n    },\n    {\n      type: 'attrPresence',\n      name: 'attr1',\n      namespace: null,\n      specificity: [ 0, 1, 0 ]\n    },\n    {\n      type: 'combinator',\n      combinator: '>',\n      left: {\n        type: 'compound',\n        list: [\n          {\n            type: 'tag',\n            name: 'div',\n            namespace: null,\n            specificity: [ 0, 0, 1 ]\n          },\n          {\n            type: 'id',\n            name: 'id1',\n            specificity: [ 1, 0, 0 ]\n          }\n        ],\n        specificity: [ 1, 0, 1 ]\n      },\n      specificity: [ 1, 0, 1 ]\n    }\n  ],\n  specificity: [ 1, 3, 1 ]\n}\nSerialized: 'div#id1>.class2.class1[attr1]'\nNormalized: 'div#id1>.class1.class2[attr1]'\n```\n\n</details>\n\n\n## Documentation\n\n* [Functions](https://github.com/mxxii/parseley/blob/main/docs/index.md)\n* [AST types](https://github.com/mxxii/parseley/blob/main/docs/modules/Ast.md)\n* [Snapshots](https://github.com/mxxii/parseley/blob/main/test/snapshots/snapshots.ts.md)\n\n\n## Input reference\n\n<https://www.w3.org/TR/selectors-4/#grammar>\n\n<https://www.w3.org/TR/css-syntax-3/#token-diagrams>\n\nTerminology used in this project is more or less consistent to the spec, with some exceptions made for clarity. The term \"type\" is way too overloaded in particular, the term \"tag\" is used where appropriate instead.\n\nAny pseudo elements are left for possible future implementation. I have no immediate need for them and they require some careful consideration.\n\n\n## Output AST\n\nConsistency: overall AST shape is always the same. This makes client code simpler, at least for a certain processing tasks.\n\nFor example, always use compound selectors, even when there is only one simple selector inside.\n\nComma-separated selectors might not be needed for every use case. So there are two functions - one can parse commas and always returns the top-level list regardless of the comma presence in a particular selector, and the other can't parse commas and returns a compound selector AST directly.\n\nComplex selectors are represented in the way that makes the left side to be an another condition on the right side element. This was made with the right-to-left processing direction in mind. One consequence of this is that there is no such thing as a \"complex selector\" node in the AST hierarchy, but there are \"combinator\" nodes attached to \"compound selector\" nodes.\n\nAll AST nodes have their specificity computed (except the top-level list of comma-separated selectors where it doesn't really make sense).\n\n\n## Motivation and inspiration\n\n| Package    | Hits      | Misses\n| ---------- | --------- | ---------\n| [parsel](https://github.com/leaverou/parsel) | Sensible AST; specificity calculation; cool name | Not friendly to node.js; based on regex\n| [css-what](https://github.com/fb55/css-what) and [css-select](https://github.com/fb55/css-select) | The idea to process complex selectors in right-to-left order | `css-select` is a solution for a different problem compared to what I needed; `css-what` produces only a list of tokens\n| [scalpel](https://github.com/gajus/scalpel)  | Introduced me to [nearley](https://nearley.js.org/) parsing toolkit (albeit I'm not using it here anymore) | AST it produces is very far from what I can use\n| [css-selector-parser](https://github.com/mdevils/css-selector-parser) | Configurable and lightweight | Again, AST is far from my needs\n","_attachments":{},"homepage":"https://github.com/mxxii/parseley","bugs":{"url":"https://github.com/mxxii/parseley/issues"},"license":"MIT"}