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

postcss-value-parser

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-value-parser - npm Package Compare versions

Comparing version 3.2.1 to 3.2.3

2

lib/parse.js

@@ -217,3 +217,3 @@ var openParentheses = '('.charCodeAt(0);

code === colon ||
code === slash && value.charCodeAt(next + 1) !== star ||
code === slash ||
code === openParentheses ||

@@ -220,0 +220,0 @@ code === closeParentheses && balanced

function stringifyNode(node) {
var type = node.type;
var value = node.value;
var buf;

@@ -8,3 +9,4 @@ if (type === 'word' || type === 'space') {

} else if (type === 'string') {
return (node.quote || '') + value + (node.quote || '');
buf = node.quote || '';
return buf + value + (node.unclosed ? '' : buf);
} else if (type === 'comment') {

@@ -15,10 +17,9 @@ return '/*' + value + (node.unclosed ? '' : '*/');

} else if (Array.isArray(node.nodes)) {
if (type === 'function') {
return value + '(' + (node.before || '') + stringify(node.nodes) + (node.after || '') + (node.unclosed ? '' : ')');
} else {
return stringify(node.nodes);
buf = stringify(node.nodes);
if (type !== 'function') {
return buf;
}
} else {
return value;
return value + '(' + (node.before || '') + buf + (node.after || '') + (node.unclosed ? '' : ')');
}
return value;
}

@@ -28,2 +29,3 @@

var result, i;
if (Array.isArray(nodes)) {

@@ -35,7 +37,6 @@ result = '';

return result;
} else {
return stringifyNode(nodes);
}
return stringifyNode(nodes);
};
module.exports = stringify;
{
"name": "postcss-value-parser",
"version": "3.2.1",
"version": "3.2.3",
"description": "Transforms css values and at-rule params into the tree",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -102,2 +102,3 @@ # postcss-value-parser

- **quote**: The quotation mark surrounding the string, either `"` or `'`.
- **unclosed**: `true` if the string was not closed properly. e.g. `"unclosed string `.

@@ -128,10 +129,9 @@ ### div

A CSS comment starts with `/*` and ends with `*/`
Node-specific properties:
- **value**: The comment value without `/*` and `*/`
- **unclosed**: True when the comment has no end.
e.g. `/* comment without an end `.
A CSS comment starts with `/*` and ends with `*/`
Node-specific properties:
- **value**: The comment value without `/*` and `*/`
- **unclosed**: `true` if the comment was not closed properly. e.g. `/* comment without an end `.
### function

@@ -151,2 +151,3 @@

- **nodes**: More nodes representing the arguments to the function.
- **unclosed**: `true` if the parentheses was not closed properly. e.g. `( unclosed-function `.

@@ -153,0 +154,0 @@ Media features surrounded by parentheses are considered functions with an

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