Socket
Socket
Sign inDemoInstall

filter-css

Package Overview
Dependencies
114
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    filter-css

My slick module


Version published
Weekly downloads
7.5K
increased by1.36%
Maintainers
1
Install size
3.53 MB
Created
Weekly downloads
 

Readme

Source

filter-css Build Status

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

FAQs

Last updated on 29 Apr 2015

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc