Socket
Socket
Sign inDemoInstall

wix-style-processor

Package Overview
Dependencies
Maintainers
1
Versions
188
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wix-style-processor - npm Package Compare versions

Comparing version 1.1.17 to 1.1.18

12

dist/src/replacer.js

@@ -7,3 +7,3 @@ "use strict";

var defaultVarDeclarationRegex = /--([^:{)]+):\s*"([^;{]+?)";?/g;
var innerQuotesRegex = /^"([^"]+)"/;
var innerQuotesRegex = /"([^"]+)"/g;
var transformRegex = /^(color|opacity|darken|string|join|number|font|increment|incrementer)\((.*)\)$/;

@@ -58,3 +58,3 @@ var singleTransformRegex = /^(\w*)\(([^()]+)\)$/;

if (innerMatch) {
replacedVal = replaceInnerQuotes(replacedVal, innerMatch[1]);
replacedVal = replaceInnerQuotes(replacedVal, innerMatch);
}

@@ -67,5 +67,7 @@ if (replacedVal[replacedVal.length - 1] === ';') {

}
function replaceInnerQuotes(val, innerVal) {
var evaled = recursiveEval(innerVal);
return val.replace(innerQuotesRegex, evaled);
function replaceInnerQuotes(val, innerVals) {
return innerVals.reduce(function (result, innerVal) {
var evaled = recursiveEval(innerVal.slice(1, -1));
return result.replace(innerVal, evaled);
}, val);
}

@@ -72,0 +74,0 @@ function recursiveEval(value) {

@@ -5,3 +5,3 @@ {

"description": "An alternative Wix Styles TPA processor",
"version": "1.1.17",
"version": "1.1.18",
"author": {

@@ -8,0 +8,0 @@ "name": "Eran Shabi",

Sorry, the diff of this file is not supported yet

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