Socket
Socket
Sign inDemoInstall

postcss-reduce-idents

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-reduce-idents - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 1.0.3
* Improved performance by iterating the AST less times.
# 1.0.2

@@ -2,0 +6,0 @@

10

index.js

@@ -10,3 +10,3 @@ 'use strict';

return list.space(value).map(function (val) {
return list.comma(val).map(callback).join(',');
return list.comma(val).map(callback).join();
}).join(' ');

@@ -17,2 +17,3 @@ }

var cache = {};
var ruleCache = [];
// Encode at rule names and cache the result

@@ -27,2 +28,3 @@ css.eachAtRule(atRuleRegex, function (rule) {

rule.params = cache[rule.params].ident;
ruleCache.push(rule);
});

@@ -40,3 +42,3 @@ // Iterate each property and change their names

// Ensure that at rules with no references to them are left unchanged
css.eachAtRule(atRuleRegex, function (rule) {
ruleCache.forEach(function (rule) {
Object.keys(cache).forEach(function (key) {

@@ -54,2 +56,3 @@ var k = cache[key];

var cache = {};
var declCache = [];
css.eachDecl(/counter-(reset|increment)/, function (decl) {

@@ -68,2 +71,3 @@ decl.value = eachValue(decl.value, function (value) {

});
declCache.push(decl);
});

@@ -84,3 +88,3 @@ css.eachDecl('content', function (decl) {

});
css.eachDecl(/counter-(reset|increment)/, function (decl) {
declCache.forEach(function (decl) {
decl.value = eachValue(decl.value, function (value) {

@@ -87,0 +91,0 @@ if (!/^-?\d*$/.test(value)) {

@@ -12,9 +12,9 @@ 'use strict';

characters = characters + '0123456789-_';
while (remainder) {
character = remainder % base;
remainder = Math.floor(remainder / base);
result = result + characters[character];
}
}
while (remainder) {
character = remainder % base;
remainder = Math.floor(remainder / base);
result = result + characters[character];
}
return result;
};
{
"name": "postcss-reduce-idents",
"version": "1.0.2",
"version": "1.0.3",
"description": "Reduce custom identifiers with PostCSS.",

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

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