{"name":"nwmatcher","version":"1.3.5","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":"be1fc7f410976e1a921583a039e0daea5d3e7341","_id":"nwmatcher@1.3.5","scripts":{},"_shasum":"dcd32a99d84580f709a02e9181c5268a514b7c58","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"diego","email":"diego.perini@gmail.com"},"dist":{"shasum":"dcd32a99d84580f709a02e9181c5268a514b7c58","tarball":"http://registry-npm.ywwl.com/nwmatcher/download/nwmatcher-1.3.5.tgz","integrity":"sha512-qxdR/f+bJZ54fCeYt5q28o9TPadto9FLGjuj7HHyria2m4j2F9hbc4Uf/12eVkZk7RJesKZd6SGCfjUx/t672Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4OLmPiudxYO7063qAYhD+ToMOrzeJgwIWLBHhWo1TogIhAOY2T+Zt3ZR9Rw50x99zj85k05j5HebTtJmvBcUkYVRc"}],"size":5391090,"noattachment":false,"key":"/nwmatcher/-/nwmatcher-1.3.5.tgz"},"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":1436780054210,"_cnpm_publish_time":1436780054210,"dist-tags":{"latest":"1.4.4"}}