filter-css
Filter CSS rules
Install
$ npm install --save filter-css
Usage
body {
margin: 0;
padding: 0;
}
@font-face {
font-family: 'Glyphicons Halflings';
}
Match @type
var filterCss = require('filter-css');
filterCss('test/fixtures/test.css',['@font-face']);
body {
margin: 0;
padding: 0;
}
Match RegExp
var filterCss = require('filter-css');
filterCss('test/fixtures/test.css',[/bod/]);
@font-face {
font-family: 'Glyphicons Halflings';
}
API
filterCss(input, [ignores])
input
Required
Type: string
CSS filepath or raw css string.
ignores
Type: array
List of RegExp, @type or selectors to remove
License
MIT © Ben Zörb