Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

alga-css

Package Overview
Dependencies
Maintainers
1
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alga-css - npm Package Compare versions

Comparing version 1.0.0-wood-8 to 1.0.0-wood-9

2

package.json
{
"name": "alga-css",
"version": "1.0.0-wood-8",
"version": "1.0.0-wood-9",
"description": "Alga CSS is a scope-first CSS toolkit for quickly mix or compose CSS references and share CSS properties between components",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -26,5 +26,14 @@ const postcss = require('postcss')

if(val.trim().startsWith('{') && val.trim().endsWith('}')) {
declVal = postcss.decl({ prop: key.trim(), value: props[val.replace('{', '').replace('}', '').trim()] })
} else if(val.trim().startsWith('props{') && val.trim().endsWith('}')) {
declVal = postcss.decl({ prop: key.trim(), value: props[val.replace('{', '').replace('}', '').trim()] })
let newDeclVal = val.replace('{', '').replace('}', '').trim()
const splitDeclVal = newDeclVal.split(/\(|\)|\s|,/g).filter(i => i !== '')
if(Number(splitDeclVal.length) === 1) {
declVal = postcss.decl({ prop: key.trim(), value: props[newDeclVal] })
} else {
for(let splittedDecl of splitDeclVal) {
if(props[splittedDecl]) {
newDeclVal = newDeclVal.replaceAll(splittedDecl, props[splittedDecl])
}
}
declVal = postcss.decl({ prop: key.trim(), value: newDeclVal })
}
} else {

@@ -31,0 +40,0 @@ declVal = postcss.decl({ prop: key.trim(), value: val.trim() })

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