{"name":"nwmatcher","version":"1.3.9","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","gitHead":"a3ff759c4ea45a03f1e30e0a8ff59313c98aa134","_id":"nwmatcher@1.3.9","scripts":{},"_shasum":"8bab486ff7fa3dfd086656bbe8b17116d3692d2a","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.8.1","_npmUser":{"name":"diego","email":"diego.perini@gmail.com"},"dist":{"shasum":"8bab486ff7fa3dfd086656bbe8b17116d3692d2a","tarball":"http://registry-npm.ywwl.com/nwmatcher/download/nwmatcher-1.3.9.tgz","integrity":"sha512-+8g9QXFbTgF4ENpY0KiXsENHl/K0M40xf4EAj45FiYpPZuwYXWBJwWK9WRviXFHA4eJ6PqZI4TFgmaoGfGZozw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKWUjcCxhdn5msTcrj5LHS14fH1QHJK5PzLM28AV7srwIhAI/ZhkBZ/xBeiXgdr5fYo6P4wYCsiuYUfmlCmQWW5PI6"}],"size":32156,"noattachment":false,"key":"/nwmatcher/-/nwmatcher-1.3.9.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/nwmatcher-1.3.9.tgz_1477433034745_0.856502516195178"},"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":1477433036761,"_cnpm_publish_time":1477433036761,"dist-tags":{"latest":"1.4.4"}}