Socket
Socket
Sign inDemoInstall

style-mod

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

style-mod - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

2

package.json
{
"name": "style-mod",
"version": "2.3.0",
"version": "2.3.1",
"description": "A minimal CSS module shim",

@@ -5,0 +5,0 @@ "main": "dist/style-mod.cjs",

@@ -28,2 +28,6 @@ function sym(name, random) {

let style = spec[name], specificity = style.specificity || 0
if (/^@/.test(name)) {
this[RULES].push(name + " {" + renderAt(style) + "}")
continue
}
let id = StyleModule.newName(), selector = name

@@ -148,2 +152,13 @@ if ((options && options.generateClasses) !== false) {

function renderAt(spec) {
let result = ""
for (let prop in spec) {
if (result) result += /}$/.test(result) ? " " : "; "
let val = spec[prop]
if (typeof val == "object") result += prop + " {" + renderAt(val) + "}"
else result += prop + ": " + val
}
return result
}
// Style::Object<union<Style,string>>

@@ -150,0 +165,0 @@ //

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