Socket
Socket
Sign inDemoInstall

postcss-wee-syntax

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-wee-syntax - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

18

lib/Parser.js

@@ -234,12 +234,12 @@ const BaseParser = require('postcss/lib/parser');

// If key: value is identified, key is at end of ordered array
if (objectArgs && (type === 'string' || type === 'word')) {
namedKey = args.ordered.pop();
args.named[namedKey] = token[1].replace(/,$/, '');
namedValue = true;
objectArgs = false;
continue;
}
if (type === 'word') {
// If key: value is identified, key is at end of ordered array
if (objectArgs) {
namedKey = args.ordered.pop();
args.named[namedKey] = token[1].replace(/,$/, '');
namedValue = true;
objectArgs = false;
continue;
}
args.ordered.push(token[1].replace(/,$/, ''));

@@ -246,0 +246,0 @@ }

{
"name": "postcss-wee-syntax",
"version": "2.0.0",
"version": "2.0.1",
"description": "Custom syntax used in the minimal front-end framework",

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

@@ -5,4 +5,4 @@ # PostCSS Wee Syntax

[![codecov](https://codecov.io/gh/weepower/postcss-wee-syntax/branch/master/graph/badge.svg)](https://codecov.io/gh/weepower/postcss-wee-syntax)
[![npm version](https://badge.fury.io/js/postcss-wee-syntax.svg)](https://badge.fury.io/js/postcss-wee-syntax)
<img width="135" height="95" src="http://postcss.github.io/postcss/logo-leftp.png" title="Philosopher’s stone, logo of PostCSS">

@@ -9,0 +9,0 @@

@@ -47,2 +47,9 @@ const parse = require('../lib/parse');

it('should parse key: value pair with string value', () => {
let root = parse(".block { mixin(key: 'value', key2: 4); }"),
node = root.first.first;
expect(JSON.stringify(node.arguments)).to.equal('{"ordered":[],"named":{"key":"\'value\'","key2":"4"}}');
});
it('should parse many key: value pairs as arguments', () => {

@@ -49,0 +56,0 @@ let root = parse(".block { mixin(padding: 1, weight: bold, background: url('test.png')); }"),

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