Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

css-parse

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-parse - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

7

index.js

@@ -58,2 +58,3 @@

var err = new Error(msg + ' near line ' + lineno + ':' + column);
err.filename = options.source;
err.line = lineno;

@@ -184,3 +185,3 @@ err.column = column;

// prop
var prop = match(/^(\*?[-\/\*\w]+(\[[0-9a-z_-]+\])?)\s*/);
var prop = match(/^(\*?[-#\/\*\w]+(\[[0-9a-z_-]+\])?)\s*/);
if (!prop) return;

@@ -455,2 +456,4 @@ prop = trim(prop[0]);

function atrule() {
if (css[0] != '@') return;
return atkeyframes()

@@ -493,3 +496,3 @@ || atmedia()

function trim(str) {
return (str || '').replace(/^\s+|\s+$/g, '');
return str ? str.replace(/^\s+|\s+$/g, '') : '';
}
{
"name": "css-parse",
"version": "1.6.0",
"version": "1.7.0",
"description": "CSS parser",

@@ -5,0 +5,0 @@ "keywords": [

@@ -0,6 +1,27 @@

# css-parse [![Build Status](https://travis-ci.org/visionmedia/css-parse.png)](https://travis-ci.org/visionmedia/css-parse)
# css-parse
JavaScript CSS parser for nodejs and the browser.
## Installation
$ npm install css-parse
## Usage
````javascript
var parse = require('css-parse');
// CSS input string
var css = "body { \n background-color: #fff;\n }";
var output_obj = parse(css);
// Position and Source parameters
var output_obj_pos = parse(css, { position: true, source: 'file.css' });
// Print parsed object as CSS string
console.log(JSON.stringify(output_obj, null, 2));
````
## Example

@@ -114,4 +135,9 @@

## Related
[css-stringify](https://github.com/visionmedia/css-stringify "CSS-Stringify")
[css-value](https://github.com/visionmedia/css-value "CSS-Value")
## License
MIT
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc