Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

selist

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

selist

Lists selectors used in cssfile

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

selist

Travis Dependencies

CSS selectors extractor.

  • Small as less than 500B.
  • Fast as 50KB of parsed css per ms on my macbook.
  • Reliable enough (to get the same results as strict, AST based, parser reworkcss/css on my 30MB of CSS).

Install it with npm:

npm i selist

And use as a CLI tool:

cat common.css | selist             # selist regexp parser
cat common.css | selist --strict    # strict ast parser with parsing errors to STDERR

Or as a node module:

var selist = require('selist');
selist.parse('.you-css-string {}');
selist.parse('.you-css-string {}', {strict: 1});

Want to test if it works for your css? Just fill test/css folder with css files you like and run

npm test

It will show you where is it different from strict parser and nice stats:

total css size processed 14.64 MB
selist took 271ms on 55.31 KB/ms
strict took 126069ms on 122 B/ms

Found any problems? Fire an issue.

MIT

Keywords

css

FAQs

Package last updated on 15 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts