{"name":"nwmatcher","version":"1.3.1","description":"A CSS3-compliant JavaScript selector engine.","homepage":"http://javascript.nwbox.com/NWMatcher/","main":"./src/nwmatcher","keywords":["css","matcher","selector","ender"],"licenses":[{"type":"MIT","url":"http://javascript.nwbox.com/NWMatcher/MIT-LICENSE"}],"author":{"name":"Diego Perini","email":"diego.perini@gmail.com","url":"http://www.iport.it/"},"maintainers":[{"name":"rvagg","email":"rod@vagg.org"},{"name":"diego","email":"diego.perini@gmail.com"}],"bugs":{"url":"http://github.com/dperini/nwmatcher/issues"},"repository":{"type":"git","url":"git://github.com/dperini/nwmatcher.git"},"ender":"./lib/ender/bridge.js","_id":"nwmatcher@1.3.1","dist":{"shasum":"ef7d4e2120c9232d0c017b356a1a66dbc1e3b9b3","tarball":"http://registry-npm.ywwl.com/nwmatcher/download/nwmatcher-1.3.1.tgz","integrity":"sha512-Fvaz1fYHYFnJh+N3foWanGs129r8DjKLmLEzEIPMbVr1C6Pf+GZgNiuwGXRFptizs4Q7CCh34DOLv809E+YoCw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHtdoAbneLENh7T/4kwuMummagEzyCl33VDyIGxYgRsjAiEAzEeOUq0L1HjE1nLJ7dKtnN4q12bs9znIpHxt+vbofd0="}],"size":31372,"noattachment":false,"key":"/nwmatcher/-/nwmatcher-1.3.1.tgz"},"_npmVersion":"1.1.65","_npmUser":{"name":"diego","email":"diego.perini@gmail.com"},"directories":{},"readme":"# [NWMatcher](http://dperini.github.io/nwmatcher/)\n\nA fast CSS selector engine and matcher.\n\n\n## Installation\n\nTo include NWMatcher in a standard web page:\n\n```html\n<script type=\"text/javascript\" src=\"nwmatcher.js\"></script>\n```\n\nTo use it with Node.js:\n\n```\n$ npm install nwmatcher\n```\n\nNWMatcher currently supports browsers (as a global, `NW.Dom`) and headless environments (as a CommonJS module).\n\n\n## Supported Selectors\n\nHere is a list of all the CSS2/CSS3 [Supported selectors](https://github.com/dperini/nwmatcher/wiki/CSS-supported-selectors).\n\n\n## Features and Compliance\n\nYou can read more about NWMatcher [features and compliance](https://github.com/dperini/nwmatcher/wiki/Features-and-compliance) on the wiki.\n\n\n## API\n\n### DOM Selection\n\n#### `first( selector, context )`\n\nReturns a reference to the first element matching `selector`, starting at `context`.\n\n#### `match( element, selector, context )`\n\nReturns `true` if `element` matches `selector`, starting at `context`; returns `false` otherwise.\n\n#### `select( selector, context, callback )`\n\nReturns an array of all the elements matching `selector`, starting at `context`. If `callback` is provided, it is invoked for each matching element.\n\n\n### DOM Helpers\n\n#### `byId( id, from )`\n\nReturns a reference to the first element with ID `id`, optionally filtered to descendants of the element `from`.\n\n#### `byTag( tag, from )`\n\nReturns an array of elements having the specified tag name `tag`, optionally filtered to descendants of the element `from`.\n\n#### `byClass( class, from )`\n\nReturns an array of elements having the specified class name `class`, optionally filtered to descendants of the element `from`.\n\n#### `byName( name, from )`\n\nReturns an array of elements having the specified value `name` for their name attribute, optionally filtered to descendants of the element `from`.\n\n#### `getAttribute( element, attribute )`\n\nReturn the value read from the attribute of `element` with name `attribute`, as a string.\n\n#### `hasAttribute( element, attribute )`\n\nReturns true `element` has an attribute with name `attribute` set; returns `false` otherwise.\n\n\n### Engine Configuration\n\n#### `configure( options )`\n\nThe following is the list of currently available configuration options, their default values and descriptions, they are boolean flags that can be set to `true` or `false`:\n\n* `CACHING`:   false - false to disable caching of result sets, true to enable\n* `ESCAPECHR`: true  - true to allow CSS escaped identifiers, false to disallow\n* `NON_ASCII`: true  - true to allow identifiers containing non-ASCII (utf-8) chars\n* `SELECTOR3`: true  - switch syntax RE, true to use Level 3, false to use Level 2\n* `UNICODE16`: true  - true to allow identifiers containing Unicode (utf-16) chars\n* `SHORTCUTS`: false - false to disable mangled selector strings like \"+div\" or \"ul>\"\n* `SIMPLENOT`: true  - true to disallow complex selectors nested in ':not()' classes\n* `SVG_LCASE`: false - false to disable matching lowercase tag names of SVG elements\n* `UNIQUE_ID`: true  - true to disallow multiple elements with the same id (strict)\n* `USE_HTML5`: true  - true to use HTML5 specs for \":checked\" and similar UI states\n* `USE_QSAPI`: true  - true to use browsers native Query Selector API if available\n* `VERBOSITY`: true  - true to throw exceptions, false to skip throwing exceptions\n* `LOGERRORS`: true  - true to print console errors or warnings, false to mute them\n\nExample:\n\n```js\nNW.Dom.configure( { USE_QSAPI: false, VERBOSITY: false } );\n```\n\n#### `registerOperator( symbol, resolver )`\n\nRegisters a new symbol and its matching resolver in the operators table. Example:\n\n```js\nNW.Dom.registerOperator( '!=', 'n!=\"%m\"' );\n```\n\n#### `registerSelector( name, rexp, func )`\n\nRegisters a new selector, with the matching regular expression and the appropriate resolver function, in the selectors table.\n","publish_time":1360624031970,"_cnpm_publish_time":1360624031970,"dist-tags":{"latest":"1.4.4"}}