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

postcss-variables

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-variables - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

17

lib/helpers.js
module.exports = {
/**
* Delay the calculation of a variable until later
*
* @param {Function} fn
* @param {Array} args
* @returns {{type: string, fn: *, args: *}}
*/
defer(fn, args) {

@@ -8,3 +15,13 @@ return {

};
},
/**
* Auto-escape icon to prep for browser
*
* @param {string} icon
* @returns {string}
*/
icon(icon) {
return `'\\${icon}'`;
}
};

2

package.json
{
"name": "postcss-variables",
"version": "1.0.1",
"version": "1.1.0",
"description": "PostCSS plugin that converts variables into CSS",

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

@@ -5,3 +5,3 @@ const expect = require('chai').expect;

const register = require('./lib/register');
const { defer } = require('./lib/helpers');
const { defer, icon } = require('./lib/helpers');

@@ -421,2 +421,9 @@ function process(input, expected, opts = {}) {

});
});
describe('Helpers: icon', () => {
it('should escape and wrap icon in quotes', () => {
expect(icon('e803')).to.equal("'\\e803'");
expect(icon("e803")).to.equal("'\\e803'");
});
});
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