{"name":"selector-lite","version":"19.11.0","license":"MIT","author":{"name":"Lauri Rooden","email":"lauri@rooden.ee"},"description":"A small pure-JavaScript CSS selector engine","keywords":["browser","css","selector","matches","closest","litejs"],"main":"selector.js","repository":{"type":"git","url":"git://github.com/litejs/selector-lite.git"},"bugs":{"url":"https://github.com/litejs/selector-lite/issues"},"jshintConfig":{"asi":true,"laxcomma":true,"maxdepth":6,"quotmark":"double","-W030":false},"litejs":{"build":["-r selector.js"]},"gitHead":"083d47b22f0adf39dd5eff0915538548b5e839f3","homepage":"https://github.com/litejs/selector-lite#readme","_id":"selector-lite@19.11.0","_nodeVersion":"8.16.2","_npmVersion":"6.9.0","dist":{"integrity":"sha512-W4KVhWrjzfIjgGcjwtFv0QXJkyo7mqnbPUiY32UwLWXFN35Y5OzDxTMcaXWOwA4OYFO9it0ep2Rnvv1AQu9fNw==","shasum":"476aae4d990deb515c075f8a1a9050f60746abdb","tarball":"http://registry-npm.ywwl.com/selector-lite/download/selector-lite-19.11.0.tgz","fileCount":3,"unpackedSize":7658,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd38zWCRA9TVsSAnZWagAAd6EP/Awd19JVy3hmR6pVNmNP\nrM/rUMHGoXQ1C5bxJXd+4dPOx6kvNSdddmWml95C2ducKWCl65riBahJN5Gi\ngr5guEy1oNs0M1oaXbSKtorw9ft/yRFRLaBgTmO38x3vS/OjmRazvdOWZ/b/\nwWCDG/2t61/snShKLb5inC7a2mclOlILoKGSshShO5MyPz7XCckqVslv5UHo\nJBNysTqJoURMvZ73rA0JoInf7GGawPBDy1Svl9c3Dj6ZwTerUxdVjE38ivVl\nq5+7ugN3Mz5Jm9qtcZl5qlaoXxKOIERq0nawlcw3ueTUg9CqJhVkKLJOSKk7\nxxK+boI51Ut+6pCMZg1F7MjuC0hEEHRuLZ7bRqq+XHAo6l1rEDv4N/6hy4hl\nVC6qcIykJeMR33z9yndVomkmtDXO5v+06UpRG5PwHLRFMOhKPmfYThZ0iuXd\nXTF9w/YvH5q+xChbpjR0xcQRi30K4BsDycpZqHSaTm3PzfQXIpuvW1ItN5Jd\n5O2Cs68X/qq3GkhRPKbHWchJQf2TjQ7O0uVuFg0YDdZhOn0J0VOHwvWZBhny\nwLLAxZjiqL24sjwYHZTMnn6bzzHJHmEuFR22cWdzvAAyzf+3Aa8+hk93DGvp\nJVXa72oA2FJ8C05mdU5cQpYcLhGMnucQf9Ju2yIpSgKNeTfFXFv1XsISQXfD\n25Pc\r\n=0vGy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIETBq+utZ69JMljUpLn8m8OkpdbWbS2UDX33RIwprwY/AiEApt2m0YhTttgZJEf9OEklAYAnWsjhCKS5KWENipFo8GE="}],"size":3307,"noattachment":false,"key":"/selector-lite/-/selector-lite-19.11.0.tgz"},"maintainers":[{"name":"lauriro","email":"lauri@rooden.ee"}],"_npmUser":{"name":"lauriro","email":"lauri@rooden.ee"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/selector-lite_19.11.0_1574948053965_0.6322854775983244"},"_hasShrinkwrap":false,"deprecated":"It is merged into dom-lite. Use require('dom-lite/selector')","readme":"[3]: https://badgen.net/coveralls/c/github/litejs/selector-lite\n[4]: https://coveralls.io/r/litejs/selector-lite\n[5]: https://badgen.net/packagephobia/install/selector-lite\n[6]: https://packagephobia.now.sh/result?p=selector-lite\n[7]: https://badgen.net/badge/icon/Buy%20Me%20A%20Tea/orange?icon=kofi&label\n[8]: https://www.buymeacoffee.com/lauriro\n\n\nSelector lite &ndash; [![Coverage][3]][4] [![Size][5]][6] [![Buy Me A Tea][7]][8]\n=============\n\n## DEPRECATED! It is merged into dom-lite. Use `require('dom-lite/selector')`\n\nA small pure-JavaScript CSS selector engine.\n\n - no library dependencies\n - CSS 3 Selector support\n - only 2KB minified and 1KB gzipped\n\nExamples\n--------\n\n```javascript\nvar selector = require(\"selector-lite\")\n\n// Can be used to implement browser built-in functions.\n\nfunction getElementById(id) {\n    return selector.find(this, \"#\" + id, true)\n}\nfunction getElementsByTagName(tag) {\n    return selector.find(this, tag)\n}\nfunction getElementsByClassName(sel) {\n    return selector.find(this, \".\" + sel.replace(/\\s+/g, \".\"))\n}\nfunction querySelector(sel) {\n    return selector.find(this, sel, true)\n}\nfunction querySelectorAll(sel) {\n    return selector.find(this, sel)\n}\n```\n\nMethods\n-------\n\n - selector.`find(node, selector, returnFirstMatch)` - Find matching elements like querySelector.\n - selector.`matches(node, selector)` - Returns a Boolean indicating whether or not\n   the element would be selected by the specified selector string.\n - selector.`closest(selector)` - Returns the Element, descendant of this element\n   (or this element itself), that is the closest ancestor of the elements\n   selected by the selectors given in parameter.\n - selector.`next(selector)` - Retrieves the next sibling that matches selector.\n - selector.`prev(selector)` - Retrieves the preceding sibling that matches selector.\n\n\nCustom selectors\n----------------\n\nCustom selector can be added to selector.selectorMap,\nwhere method shortcuts are available (m->matches, c->closest, n->next, p->prev).\n\n - `_` - node.\n - `v` - part between `()` in `:nth-child(2n+1)`.\n - `a` and `b` can be used as temp variables.\n\n```javascript\n// Add `:input` selector\nselector.selectorMap.input = \"_.tagName=='INPUT'\"\n\n// Add `:val()` selector\nselector.selectorMap.val = \"_.value==v\"\n```\n\n## Contributing\n\nFollow [Coding Style Guidelines](https://github.com/litejs/litejs/wiki/Style-Guidelines)\n\nRun tests\n\n```\nnpm install\nnpm test\n```\n\n## External links\n\n[GitHub repo](https://github.com/litejs/selector-lite) |\n[npm package](https://npmjs.org/package/selector-lite) |\n[DOM spec](https://dom.spec.whatwg.org/) |\n[Selectors Level 3](http://www.w3.org/TR/selectors/) |\n[Coveralls coverage](https://coveralls.io/github/litejs/selector-lite)  \n[Buy Me A Tea][8]\n\n\n## Licence\n\nCopyright (c) 2015-2021 Lauri Rooden &lt;lauri@rooden.ee&gt;  \n[The MIT License](http://lauri.rooden.ee/mit-license.txt)\n\n\n","publish_time":1574948054099,"_cnpm_publish_time":1574948054099,"dist-tags":{"latest":"23.1.0"}}