{"_id":"closest","_rev":"12-ff222b7788e6497dc7e3217befe80398","name":"closest","description":"Find the closest parent that matches a selector.","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"closest","version":"0.0.1","description":"Find the closest parent that matches a selector.","keywords":["browserify","CSS","selector","closest","parents","jquery"],"dependencies":{"matches-selector":"0.0.1"},"repository":{"type":"git","url":"https://github.com/ForbesLindesay/closest.git"},"author":{"name":"Jonathan Ong"},"license":"MIT","readme":"# Closest\r\n\r\nSimilar to jQuery's `$.fn.closest` and `$.fn.parents`.\r\nFinds the closest parent that matches a selector.\r\n\r\n## Installation\r\n\r\n    $ npm install closest\r\n\r\n## API\r\n\r\n### `closest(element, selector, checkSelf)`\r\n\r\n* element - will check this elements parents\r\n* selector - CSS selector to match parents\r\n* checkSelf - check `element`.\r\n  If falsey, will begin with `element.parentNode` and is synonymous to `$.fn.parents`.\r\n  Otherwise, it's `$.fn.closest`.\r\n\r\nExample:\r\n\r\n```javascript\r\nvar closest = require('cosest');\r\n\r\nclosest(document.body, 'html') === document.documentElement\r\nclosest(document.body, 'body', true) === document.body\r\nclosest(document.documentElement, 'html') == null\r\n```\r\n\r\n## License\r\n\r\n  MIT\r\n","readmeFilename":"README.md","_id":"closest@0.0.1","dist":{"shasum":"26da6f80b3e0e17e71f80f12782819e9f653495c","tarball":"https://registry.npmjs.org/closest/-/closest-0.0.1.tgz","integrity":"sha512-HafRXTAiWp5nf6kxOy2EoIGSsJMn0zew9E5zp3Dy/8CXdp8GvVjZn1TSMEVdDxSP/acXZcWJWiIgF83Di7M1Ew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZw7bOx1zMxwKuIvPKnySwJE9zzdC6UyX/kSgZJwvkZQIhAL7foDhljnbHQf4Vy9wukaIVIWv9izklWUW8Nu1CBxFu"}]},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}]}},"readme":"# Closest\r\n\r\nSimilar to jQuery's `$.fn.closest` and `$.fn.parents`.\r\nFinds the closest parent that matches a selector.\r\n\r\n## Installation\r\n\r\n    $ npm install closest\r\n\r\n## API\r\n\r\n### `closest(element, selector, checkSelf)`\r\n\r\n* element - will check this elements parents\r\n* selector - CSS selector to match parents\r\n* checkSelf - check `element`.\r\n  If falsey, will begin with `element.parentNode` and is synonymous to `$.fn.parents`.\r\n  Otherwise, it's `$.fn.closest`.\r\n\r\nExample:\r\n\r\n```javascript\r\nvar closest = require('cosest');\r\n\r\nclosest(document.body, 'html') === document.documentElement\r\nclosest(document.body, 'body', true) === document.body\r\nclosest(document.documentElement, 'html') == null\r\n```\r\n\r\n## License\r\n\r\n  MIT\r\n","maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"time":{"modified":"2022-06-13T06:11:47.377Z","created":"2013-03-13T17:14:06.285Z","0.0.1":"2013-03-13T17:14:08.915Z"},"author":{"name":"Jonathan Ong"},"repository":{"type":"git","url":"https://github.com/ForbesLindesay/closest.git"},"users":{"monjer":true,"s4g6":true,"drazik":true,"dralc":true,"seangenabe":true,"npmrud5g":true,"shanewholloway":true}}