You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

postcss-js

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-js - npm Package Compare versions

Comparing version
5.0.1
to
5.0.2
+1
-1
package.json
{
"name": "postcss-js",
"version": "5.0.1",
"version": "5.0.2",
"description": "PostCSS for CSS-in-JS and styles in JS objects",

@@ -5,0 +5,0 @@ "keywords": [

@@ -30,7 +30,24 @@ let postcss = require('postcss')

let { fromCharCode } = String;
function dashify(str) {
return str
.replace(/([A-Z])/g, '-$1')
.replace(/^ms-/, '-ms-')
.toLowerCase()
let result = '';
let i = 0;
let len = str.length;
let code;
if (str[0] === 'm' && str[1] === 's') result += fromCharCode(45); // '-'
for (; i < len; i++) {
code = str[i].charCodeAt(0);
if (code > 64 && code < 91) {
result += fromCharCode(45) + fromCharCode(code + 32);
continue;
}
result += fromCharCode(code);
}
return result;
}

@@ -37,0 +54,0 @@