Socket
Socket
Sign inDemoInstall

inline-style-prefixer

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inline-style-prefixer - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

3

Changelog.md

@@ -5,2 +5,5 @@ # Changelog

### 3.0.2
* performance improvements (up to 30% faster)
### 3.0.1

@@ -7,0 +10,0 @@ * performance improvements (~10% faster) ( [#115](https://github.com/rofrischmann/inline-style-prefixer/pull/115) ) ( [#116](https://github.com/rofrischmann/inline-style-prefixer/pull/116) )

4

package.json
{
"name": "inline-style-prefixer",
"version": "3.0.1",
"version": "3.0.2",
"description": "Run-time Autoprefixer for JavaScript style objects",

@@ -67,2 +67,4 @@ "main": "dynamic/index.js",

"gh-pages": "^0.12.0",
"gitbook": "^3.2.2",
"gitbook-cli": "^2.3.0",
"istanbul": "1.0.0-alpha.2",

@@ -69,0 +71,0 @@ "mocha": "^2.4.5",

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

style = (0, _prefixProperty2.default)(prefixMap, property, style);
(0, _prefixProperty2.default)(prefixMap, property, style);
}

@@ -63,0 +63,0 @@ }

@@ -15,25 +15,9 @@ 'use strict';

function prefixProperty(prefixProperties, property, style) {
if (!prefixProperties.hasOwnProperty(property)) {
return style;
if (prefixProperties.hasOwnProperty(property)) {
var requiredPrefixes = prefixProperties[property];
for (var i = 0, len = requiredPrefixes.length; i < len; ++i) {
style[requiredPrefixes[i] + (0, _capitalizeString2.default)(property)] = style[property];
}
}
// We need to preserve the order of the styles while inserting new prefixed
// styles. Object order is not guaranteed, but this is better than nothing.
// Note that this is brittle and is likely to break in older versions of
// Node (e.g. Node 4).
var newStyle = {};
Object.keys(style).forEach(function (styleProperty) {
if (styleProperty === property) {
// We've found the style we need to prefix.
var requiredPrefixes = prefixProperties[property];
for (var i = 0, len = requiredPrefixes.length; i < len; ++i) {
newStyle[requiredPrefixes[i] + (0, _capitalizeString2.default)(property)] = style[property];
}
}
newStyle[styleProperty] = style[styleProperty];
});
return newStyle;
}
module.exports = exports['default'];
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