{"_id":"extract-from-css","_rev":"327982","name":"extract-from-css","description":"Extract information from CSS code","dist-tags":{"latest":"0.4.4"},"maintainers":[{"name":"rubennorte","email":"rubennorte@gmail.com"}],"time":{"modified":"2021-06-07T02:45:11.000Z","created":"2014-11-29T00:38:47.684Z","0.4.4":"2015-02-28T19:04:36.375Z","0.4.3":"2015-02-23T19:01:18.679Z","0.4.2":"2015-02-22T19:00:25.653Z","0.4.1":"2015-01-30T22:18:42.458Z","0.4.0":"2014-11-29T22:22:21.312Z","0.3.1":"2014-11-29T21:35:56.261Z","0.3.0":"2014-11-29T21:29:50.758Z","0.2.0":"2014-11-29T14:38:58.257Z","0.1.1":"2014-11-29T14:10:02.108Z","0.1.0":"2014-11-29T00:38:47.684Z"},"users":{},"author":{"name":"Rubén Norte","email":"rubennorte@gmail.com"},"repository":{"type":"git","url":"https://github.com/rubennorte/extract-from-css.git"},"versions":{"0.4.4":{"name":"extract-from-css","version":"0.4.4","description":"Extract information from CSS code","main":"lib/index.js","repository":{"type":"git","url":"https://github.com/rubennorte/extract-from-css.git"},"bugs":{"url":"https://github.com/rubennorte/extract-from-css/issues"},"scripts":{"lint":"jscs . && jscs ./tests && jshint .","pretest":"npm run lint","test":"JASMINE_CONFIG_PATH=tests/jasmine.json jasmine","coverage":"JASMINE_CONFIG_PATH=tests/jasmine.json istanbul cover jasmine","benchmark":"node tests/benchmark/benchmark.js","build":"npm test","travis":"npm run coverage && cat ./tests/output/coverage/lcov.info | coveralls && rm -rf ./tests/output/coverage","release":"npm run build && mversion -m \"New version: %s\" "},"files":["lib","CHANGELOG.md"],"author":{"name":"Rubén Norte","email":"rubennorte@gmail.com"},"license":"MIT","devDependencies":{"benchmark":"^1.0.0","coveralls":"^2.11.2","istanbul":"^0.3.5","jasmine":"^2.2.1","jscs":"^1.11.3","jshint":"^2.5.10","mversion":"^1.9.0"},"dependencies":{"css":"^2.1.0"},"engines":{"node":">=0.10.0","npm":">=2.0.0"},"gitHead":"633a9685a744214cfc96f3a56b46117c14d9d37c","homepage":"https://github.com/rubennorte/extract-from-css","_id":"extract-from-css@0.4.4","_shasum":"1ea7df2e7c7c6eb9922fa08e8adaea486f6f8f92","_from":".","_npmVersion":"2.6.0","_nodeVersion":"0.10.36","_npmUser":{"name":"rubennorte","email":"rubennorte@gmail.com"},"maintainers":[{"name":"rubennorte","email":"rubennorte@gmail.com"}],"dist":{"shasum":"1ea7df2e7c7c6eb9922fa08e8adaea486f6f8f92","size":4339,"noattachment":false,"key":"/extract-from-css/-/extract-from-css-0.4.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/extract-from-css/download/extract-from-css-0.4.4.tgz"},"directories":{},"publish_time":1425150276375,"_cnpm_publish_time":1425150276375,"_hasShrinkwrap":false},"0.4.3":{"name":"extract-from-css","version":"0.4.3","description":"Extract information from CSS code","main":"lib/index.js","repository":{"type":"git","url":"https://github.com/rubennorte/extract-from-css.git"},"bugs":{"url":"https://github.com/rubennorte/extract-from-css/issues"},"scripts":{"lint":"jscs . && jshint .","pretest":"npm run lint","test":"jasmine","coverage":"istanbul cover jasmine","benchmark":"node test/benchmark.js","build":"npm test","travis":"npm run coverage && cat ./output/coverage/lcov.info | coveralls && rm -rf ./output/coverage","release":"npm run build && mversion -m \"New version: %s\" "},"files":["lib","CHANGELOG.md"],"author":{"name":"Rubén Norte","email":"rubennorte@gmail.com"},"license":"MIT","devDependencies":{"benchmark":"^1.0.0","coveralls":"^2.11.2","istanbul":"^0.3.5","jasmine":"^2.2.1","jscs":"^1.11.3","jshint":"^2.5.10","mversion":"^1.9.0"},"dependencies":{"css":"^2.1.0"},"engines":{"node":">=0.10.0"},"gitHead":"0bb9a5434986ea4fd2619b30ab88448414f4b3e0","homepage":"https://github.com/rubennorte/extract-from-css","_id":"extract-from-css@0.4.3","_shasum":"84b14a00a0ceb7438913504419783a6c6746d387","_from":".","_npmVersion":"2.6.0","_nodeVersion":"0.10.36","_npmUser":{"name":"rubennorte","email":"rubennorte@gmail.com"},"maintainers":[{"name":"rubennorte","email":"rubennorte@gmail.com"}],"dist":{"shasum":"84b14a00a0ceb7438913504419783a6c6746d387","size":3977,"noattachment":false,"key":"/extract-from-css/-/extract-from-css-0.4.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/extract-from-css/download/extract-from-css-0.4.3.tgz"},"directories":{},"publish_time":1424718078679,"_cnpm_publish_time":1424718078679,"_hasShrinkwrap":false},"0.4.2":{"name":"extract-from-css","version":"0.4.2","description":"Extract information from CSS code","main":"lib/index.js","repository":{"type":"git","url":"https://github.com/rubennorte/extract-from-css.git"},"bugs":{"url":"https://github.com/rubennorte/extract-from-css/issues"},"scripts":{"lint":"jscs . && jshint .","pretest":"npm run lint","test":"jasmine","coverage":"istanbul cover jasmine","benchmark":"node test/benchmark.js","build":"npm test","travis":"npm run coverage && cat ./output/coverage/lcov.info | coveralls && rm -rf ./output/coverage","release":"npm run build && mversion -m \"New version: %s\" "},"files":["lib","CHANGELOG.md"],"author":{"name":"Rubén Norte","email":"rubennorte@gmail.com"},"license":"MIT","devDependencies":{"benchmark":"^1.0.0","coveralls":"^2.11.2","istanbul":"^0.3.5","jasmine":"2.1.1","jscs":"^1.11.3","jshint":"^2.5.10","mversion":"^1.9.0"},"dependencies":{"css":"^2.1.0"},"engines":{"node":">=0.10.0"},"gitHead":"24de65d842feb169cf896435fa0f51cd76711277","homepage":"https://github.com/rubennorte/extract-from-css","_id":"extract-from-css@0.4.2","_shasum":"ca803845bf4cedc9e885bd19cd81b06171acc5a9","_from":".","_npmVersion":"2.6.0","_nodeVersion":"0.10.36","_npmUser":{"name":"rubennorte","email":"rubennorte@gmail.com"},"maintainers":[{"name":"rubennorte","email":"rubennorte@gmail.com"}],"dist":{"shasum":"ca803845bf4cedc9e885bd19cd81b06171acc5a9","size":3934,"noattachment":false,"key":"/extract-from-css/-/extract-from-css-0.4.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/extract-from-css/download/extract-from-css-0.4.2.tgz"},"directories":{},"publish_time":1424631625653,"_cnpm_publish_time":1424631625653,"_hasShrinkwrap":false},"0.4.1":{"name":"extract-from-css","version":"0.4.1","description":"Extract information from CSS code","main":"lib/index.js","repository":{"type":"git","url":"https://github.com/rubennorte/extract-from-css.git"},"bugs":{"url":"https://github.com/rubennorte/extract-from-css/issues"},"scripts":{"test":"jasmine","benchmark":"node test/benchmark.js","jshint":"jshint .","build":"npm run jshint && npm test"},"author":{"name":"Rubén Norte","email":"rubennorte@gmail.com"},"license":"MIT","devDependencies":{"jasmine":"^2.1.0","benchmark":"^1.0.0","jshint":"^2.5.10"},"dependencies":{"css":"^2.1.0"},"engines":{"node":">=0.10.0"},"gitHead":"23ddd22a77be30379d5ef105292b425d714baf18","homepage":"https://github.com/rubennorte/extract-from-css","_id":"extract-from-css@0.4.1","_shasum":"cb3b597a3e62f79dbf6a78d211b755d6e031cd59","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"rubennorte","email":"rubennorte@gmail.com"},"maintainers":[{"name":"rubennorte","email":"rubennorte@gmail.com"}],"dist":{"shasum":"cb3b597a3e62f79dbf6a78d211b755d6e031cd59","size":69431,"noattachment":false,"key":"/extract-from-css/-/extract-from-css-0.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/extract-from-css/download/extract-from-css-0.4.1.tgz"},"directories":{},"publish_time":1422656322458,"_cnpm_publish_time":1422656322458,"_hasShrinkwrap":false},"0.4.0":{"name":"extract-from-css","version":"0.4.0","description":"Extract information from CSS code","main":"lib/index.js","repository":{"type":"git","url":"https://github.com/rubennorte/extract-from-css.git"},"scripts":{"test":"jasmine","benchmark":"node test/benchmark.js"},"author":{"name":"Rubén Norte","email":"rubennorte@gmail.com"},"license":"MIT","devDependencies":{"jasmine":"^2.1.0","benchmark":"^1.0.0"},"dependencies":{"css":"^2.1.0"},"engines":{"node":">=0.10.0"},"bugs":{"url":"https://github.com/rubennorte/extract-from-css/issues"},"homepage":"https://github.com/rubennorte/extract-from-css","_id":"extract-from-css@0.4.0","dist":{"shasum":"e0d6868d465e5f76fd4f1f690b761b4f420f9d04","size":68950,"noattachment":false,"key":"/extract-from-css/-/extract-from-css-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/extract-from-css/download/extract-from-css-0.4.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"rubennorte","email":"rubennorte@gmail.com"},"maintainers":[{"name":"rubennorte","email":"rubennorte@gmail.com"}],"directories":{},"publish_time":1417299741312,"_cnpm_publish_time":1417299741312,"_hasShrinkwrap":false},"0.3.1":{"name":"extract-from-css","version":"0.3.1","description":"Extract information from CSS code","main":"lib/index.js","repository":{"type":"git","url":"https://github.com/rubennorte/extract-from-css.git"},"scripts":{"test":"jasmine","benchmark":"node test/benchmark.js"},"author":{"name":"Rubén Norte","email":"rubennorte@gmail.com"},"license":"MIT","devDependencies":{"jasmine":"^2.1.0","benchmark":"^1.0.0"},"dependencies":{"css":"^2.1.0"},"engines":{"node":">=0.10.0"},"bugs":{"url":"https://github.com/rubennorte/extract-from-css/issues"},"homepage":"https://github.com/rubennorte/extract-from-css","_id":"extract-from-css@0.3.1","dist":{"shasum":"679519f90d5bad00677d6b52d32dc24a35f7fa56","size":68333,"noattachment":false,"key":"/extract-from-css/-/extract-from-css-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/extract-from-css/download/extract-from-css-0.3.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"rubennorte","email":"rubennorte@gmail.com"},"maintainers":[{"name":"rubennorte","email":"rubennorte@gmail.com"}],"directories":{},"publish_time":1417296956261,"_cnpm_publish_time":1417296956261,"_hasShrinkwrap":false},"0.3.0":{"name":"extract-from-css","version":"0.3.0","description":"Extract information from CSS code","main":"lib/index.js","repository":{"type":"git","url":"https://github.com/rubennorte/extract-from-css.git"},"scripts":{"test":"jasmine","benchmark":"node test/benchmark.js"},"author":{"name":"Rubén Norte","email":"rubennorte@gmail.com"},"license":"MIT","devDependencies":{"jasmine":"^2.1.0","benchmark":"^1.0.0"},"dependencies":{"css":"^2.1.0"},"engines":{"node":">=0.10.0"},"bugs":{"url":"https://github.com/rubennorte/extract-from-css/issues"},"homepage":"https://github.com/rubennorte/extract-from-css","_id":"extract-from-css@0.3.0","dist":{"shasum":"cd631b0ae08e30e87f1af4e0106ecb20cda28006","size":68307,"noattachment":false,"key":"/extract-from-css/-/extract-from-css-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/extract-from-css/download/extract-from-css-0.3.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"rubennorte","email":"rubennorte@gmail.com"},"maintainers":[{"name":"rubennorte","email":"rubennorte@gmail.com"}],"directories":{},"publish_time":1417296590758,"_cnpm_publish_time":1417296590758,"_hasShrinkwrap":false},"0.2.0":{"name":"extract-from-css","version":"0.2.0","description":"Extract information from CSS code","main":"lib/index.js","repository":{"type":"git","url":"https://github.com/rubennorte/extract-from-css.git"},"scripts":{"test":"jasmine"},"author":{"name":"Rubén Norte","email":"rubennorte@gmail.com"},"license":"MIT","devDependencies":{"jasmine":"^2.1.0"},"dependencies":{"css":"^2.1.0"},"engines":{"node":">=0.10.0"},"bugs":{"url":"https://github.com/rubennorte/extract-from-css/issues"},"homepage":"https://github.com/rubennorte/extract-from-css","_id":"extract-from-css@0.2.0","dist":{"shasum":"608fda1215f0c7535aa963389c97f6314c406e19","size":3358,"noattachment":false,"key":"/extract-from-css/-/extract-from-css-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/extract-from-css/download/extract-from-css-0.2.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"rubennorte","email":"rubennorte@gmail.com"},"maintainers":[{"name":"rubennorte","email":"rubennorte@gmail.com"}],"directories":{},"publish_time":1417271938257,"_cnpm_publish_time":1417271938257,"_hasShrinkwrap":false},"0.1.1":{"name":"extract-from-css","version":"0.1.1","description":"Extract information from CSS code","main":"lib/index.js","repository":{"type":"git","url":"https://github.com/rubennorte/extract-from-css.git"},"scripts":{"test":"jasmine"},"author":{"name":"Rubén Norte","email":"rubennorte@gmail.com"},"license":"MIT","devDependencies":{"jasmine":"^2.1.0"},"dependencies":{"css":"^2.1.0"},"engines":{"node":">=0.10.0"},"bugs":{"url":"https://github.com/rubennorte/extract-from-css/issues"},"homepage":"https://github.com/rubennorte/extract-from-css","_id":"extract-from-css@0.1.1","dist":{"shasum":"5772a4c1ee7f74e171abc9555c823fddfcb62a6b","size":3307,"noattachment":false,"key":"/extract-from-css/-/extract-from-css-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/extract-from-css/download/extract-from-css-0.1.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"rubennorte","email":"rubennorte@gmail.com"},"maintainers":[{"name":"rubennorte","email":"rubennorte@gmail.com"}],"directories":{},"publish_time":1417270202108,"_cnpm_publish_time":1417270202108,"_hasShrinkwrap":false},"0.1.0":{"name":"extract-from-css","version":"0.1.0","description":"Extract information from CSS code","main":"lib/index.js","repository":{"type":"git","url":"https://github.com/rubennorte/extract-from-css.git"},"scripts":{"test":"jasmine"},"author":{"name":"Rubén Norte","email":"rubennorte@gmail.com"},"license":"MIT","devDependencies":{"jasmine":"^2.1.0"},"dependencies":{"css":"^2.1.0","css-selector-parser":"^1.0.3"},"bugs":{"url":"https://github.com/rubennorte/extract-from-css/issues"},"homepage":"https://github.com/rubennorte/extract-from-css","_id":"extract-from-css@0.1.0","dist":{"shasum":"c81fab1e5be54cbf1455555e097e342fc8834e56","size":3293,"noattachment":false,"key":"/extract-from-css/-/extract-from-css-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/extract-from-css/download/extract-from-css-0.1.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"rubennorte","email":"rubennorte@gmail.com"},"maintainers":[{"name":"rubennorte","email":"rubennorte@gmail.com"}],"directories":{},"publish_time":1417221527684,"_cnpm_publish_time":1417221527684,"_hasShrinkwrap":false}},"readme":"[![npm](https://img.shields.io/npm/v/extract-from-css.svg)](https://npmjs.org/package/extract-from-css)\n[![npm](https://img.shields.io/npm/l/extract-from-css.svg)](https://npmjs.org/package/extract-from-css)\n[![Build Status](https://travis-ci.org/rubennorte/extract-from-css.svg?branch=master)](https://travis-ci.org/rubennorte/extract-from-css)\n[![Coverage Status](https://coveralls.io/repos/rubennorte/extract-from-css/badge.svg)](https://coveralls.io/r/rubennorte/extract-from-css)\n[![Code Climate](https://codeclimate.com/github/rubennorte/extract-from-css/badges/gpa.svg)](https://codeclimate.com/github/rubennorte/extract-from-css)  \n[![Dependency Status](https://david-dm.org/rubennorte/extract-from-css.svg?theme=shields.io&style=flat)](https://david-dm.org/rubennorte/extract-from-css)\n[![devDependency Status](https://david-dm.org/rubennorte/extract-from-css/dev-status.svg?theme=shields.io&style=flat)](https://david-dm.org/rubennorte/extract-from-css#info=devDependencies)\n\n# Extract from CSS\n\nExtract information from CSS code.\n\nFor now, it extracts class names and ids.\n\n## Installation\n\nDependencies:\n\n* node >= 0.10\n* npm >= 1.3.7 (package usage)\n* npm >= 2.0.0 (package development)\n\n```bash\nnpm install extract-from-css\n```\n\n## Usage\n\n```javascript\nvar extract = require('extract-from-css');\n\nvar code = '.list-item { background: red; } \\\n  /* comment */ \\\n  #main-header { background: black; } \\\n  .list-item-title:hover { font-weight: bold; } ';\n\nextract(['ids', 'classes'], code);\n// {\n//   ids: [ 'main-header' ],\n//   classes: [ 'list-item', 'list-item-title' ]\n// }\n\nextract.extractClasses(code);\n// [ 'list-item', 'list-item-title' ]\n\nextract.extractIds(code);\n// [ 'main-header' ]\n```\n\nWorks with nested rules (inside media queries, supports...), complex selectors and escaped characters and unicode symbols (♠, ♥, ★...) in class names and ids. See tests.\n\n## Tests\n\nTo run the tests with Jasmine:\n\n```bash\nnpm install\nnpm test\n```\n\nTo run the benchmark:\n\n```bash\nnpm run benchmark\n```\n\nTo check the code:\n\n```bash\nnpm run lint\n```\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Check the build: `npm run build`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Rubén Norte\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.","_attachments":{},"homepage":"https://github.com/rubennorte/extract-from-css","bugs":{"url":"https://github.com/rubennorte/extract-from-css/issues"},"license":"MIT"}