New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

cssex

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cssex

css process lib. grammatree, uglify, beautify tool.

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

CssEx [Css Parser]

css process lib. grammatree, uglify, beautify tool.

Usage

In Nodejs

$ npm install cssex

then

var CssEx = require('cssex');

In Browser

<script src="or.cssparser/core.js"></script>
var sourceCode = 'div { background: #333 url(aa.png) no-repeat; }';
var tree = new CssEx(sourceCode);
// console.log(tree.grammarTree);

tree.walk(function (node) {
	//walk by every node you can process
	console.log(node);
});

// toString
tree.toString() // make gramma tree to code string

Uglify & Compress

var tree = new CssEx(sourceCode);
tree.uglify().walk(function (node) {
	// process node
}).toString();

// or just
tree.uglify().toString();

beautify - todo

Keywords

css

FAQs

Package last updated on 23 Dec 2014

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