{"author":{"name":"Felix Böhm","email":"me@feedic.com","url":"http://feedic.com"},"name":"CSSwhat","description":"a CSS selector parser","version":"0.4.5","repository":{"url":"https://github.com/FB55/CSSwhat"},"main":"./index.js","scripts":{"test":"node tests/test.js"},"dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"license":"BSD-like","bugs":{"url":"https://github.com/FB55/CSSwhat/issues"},"homepage":"https://github.com/FB55/CSSwhat","_id":"CSSwhat@0.4.5","dist":{"shasum":"85d7b2799ff3d98055353c802949e39913e16a62","tarball":"http://registry-npm.ywwl.com/CSSwhat/download/CSSwhat-0.4.5.tgz","integrity":"sha512-Jd3XF0pUJHec8Ex3rusZH78vMUW4D4S7b4SZhkD4daCfGxzxeDgnZi64gU17QCRTbDebgbcHbCHgbyK4jfJNYg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxBcReJfuw8yD9GfEHBPPivIvHI+glEgqiSV52el7lWwIgXIW7ULi7nPz9knPwmR+NUi6OrDtNLSd3C4aM+hQvfPA="}],"size":15539,"noattachment":false,"key":"/CSSwhat/-/CSSwhat-0.4.5.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}],"deprecated":"the module is now available as 'css-what'","directories":{},"readme":"#CSSwhat [![Build Status](https://secure.travis-ci.org/fb55/CSSwhat.png?branch=master)](http://travis-ci.org/fb55/CSSwhat)\n\na CSS selector parser\n\n##Example\n\n```js\nrequire('CSSwhat')('foo[bar]:baz')\n\n~> [ [ { type: 'tag', name: 'foo' },\n    { type: 'attribute',\n      name: 'bar',\n      action: 'exists',\n      value: '',\n      ignoreCase: false },\n    { type: 'pseudo',\n      name: 'baz',\n      data: null } ] ]\n```\n\n##API\n\n__`CSSwhat(selector, options)` - Parses `str`, with the passed `options`.__\n\nThe function returns a two-dimensional array. The first array represents subselects separated by commas (eg. `sub1, sub2`), the second contains the relevant tokens for that selector. Possible token types are:\n\nname | attributes | example | output\n---- | ---------- | ------- | ------\n`tag`| `name`    | `div`   | `{ type: 'tag', name: 'div' }`\n`universal`| -   | `*`     | `{ type: 'universal' }`\n`pseudo`| `name`, `data`|`:name(data)`| `{ type: 'pseudo', name: 'name', data: 'data' }`\n`pseudo`| `name`, `data`|`:name`| `{ type: 'pseudo', name: 'name', data: null }`\n`attribute`|`name`, `action`, `value`, `ignoreCase`|`[attr]`|`{ type: 'attribute', name: 'attr', action: 'exists', value: '', ignoreCase: false }`\n`attribute`|`name`, `action`, `value`, `ignoreCase`|`[attr=val]`|`{ type: 'attribute', name: 'attr', action: 'equals', value: 'val', ignoreCase: false }`\n`attribute`|`name`, `action`, `value`, `ignoreCase`|`[attr^=val]`|`{ type: 'attribute', name: 'attr', action: 'start', value: 'val', ignoreCase: false }`\n`attribute`|`name`, `action`, `value`, `ignoreCase`|`[attr$=val]`|`{ type: 'attribute', name: 'attr', action: 'end', value: 'val', ignoreCase: false }`\n\n//TODO complete list\n\n__Options:__\n\n- `xmlMode`: When enabled, tagnames will be case-sensitive (ie. the output won't be lowercased).\n\n---\n\nLicense: BSD-like\n","publish_time":1393777146961,"_cnpm_publish_time":1393777146961,"dist-tags":{"latest":"0.4.7"}}