css-selectors-count

1.0.1 • Public • Published

css-selector-count Build Status npm version

Count selectors in your CSS file in order to make sure it don't exceed the limitation of legacy IE browsers.

Usage

var csc = require('css-selectors-count');
var fs = require('fs');

fs.readFile('style.css', {encoding: 'utf8'}, function(err, file) {
  if(err) throw err;
  console.log(csc(file)); // return a object like { rules: 1, selectors: 10}
});

Scripts

$ npm run test
$ npm run coverage

License

MIT

Package Sidebar

Install

npm i css-selectors-count

Weekly Downloads

281

Version

1.0.1

License

MIT

Last publish

Collaborators

  • jasonslyvia