jss-plugin-rule-value-function
Advanced tools
@@ -144,7 +144,3 @@ function warning(condition, message) { | ||
| var toCssValue = function toCssValue(value, ignoreImportant) { | ||
| if (ignoreImportant === void 0) { | ||
| ignoreImportant = false; | ||
| } | ||
| var toCssValue = function toCssValue(value) { | ||
| if (!Array.isArray(value)) return value; | ||
@@ -162,3 +158,3 @@ var cssValue = ''; // Support space separated values via `[['5px', '10px']]`. | ||
| if (!ignoreImportant && value[value.length - 1] === '!important') { | ||
| if (value[value.length - 1] === '!important') { | ||
| cssValue += ' !important'; | ||
@@ -1688,8 +1684,3 @@ } | ||
| if (Array.isArray(value)) { | ||
| cssValue = toCssValue(value, true); | ||
| if (value[value.length - 1] === '!important') { | ||
| cssRule.style.setProperty(prop, cssValue, 'important'); | ||
| return true; | ||
| } | ||
| cssValue = toCssValue(value); | ||
| } // Support CSSTOM. | ||
@@ -1701,3 +1692,5 @@ | ||
| } else { | ||
| cssRule.style.setProperty(prop, cssValue); | ||
| var indexOfImportantFlag = cssValue ? cssValue.indexOf('!important') : -1; | ||
| var cssValueWithoutImportantFlag = indexOfImportantFlag > -1 ? cssValue.substr(0, indexOfImportantFlag - 1) : cssValue; | ||
| cssRule.style.setProperty(prop, cssValueWithoutImportantFlag, indexOfImportantFlag > -1 ? 'important' : ''); | ||
| } | ||
@@ -2115,3 +2108,3 @@ } catch (err) { | ||
| this.id = instanceCounter++; | ||
| this.version = "10.9.1-alpha.1"; | ||
| this.version = "10.9.1-alpha.2"; | ||
| this.plugins = new PluginsRegistry(); | ||
@@ -2118,0 +2111,0 @@ this.options = { |
+3
-3
| { | ||
| "name": "jss-plugin-rule-value-function", | ||
| "description": "JSS plugin for function value and rule syntax", | ||
| "version": "10.9.1-alpha.1", | ||
| "version": "10.9.1-alpha.2", | ||
| "license": "MIT", | ||
@@ -47,6 +47,6 @@ "homepage": "https://cssinjs.org/", | ||
| "@babel/runtime": "^7.3.1", | ||
| "jss": "10.9.1-alpha.1", | ||
| "jss": "10.9.1-alpha.2", | ||
| "tiny-warning": "^1.0.2" | ||
| }, | ||
| "gitHead": "6386739e1015ecd6f85a7e9c7a0c89d65ad153b9" | ||
| "gitHead": "69517944d6b00246858af9d95a796580533fcaa5" | ||
| } |
+1
-1
@@ -11,3 +11,3 @@ # jss-plugin-rule-value-function | ||
| See our website [jss-plugin-rule-value-function](https://cssinjs.org/jss-plugin-rule-value-function?v=v10.9.1-alpha.1) for more information. | ||
| See our website [jss-plugin-rule-value-function](https://cssinjs.org/jss-plugin-rule-value-function?v=v10.9.1-alpha.2) for more information. | ||
@@ -14,0 +14,0 @@ ## Install |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
79586
0.02%34
-2.86%2143
-0.23%+ Added
- Removed
Updated