Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
create CSS-compatible strings from object trees
let style = document.createElement("style")
document.head.appendChild(style)
style.innerText = stringify({
body: {
display: "flex",
height: "100%"
}
})
This package exposes the stringify
function, which creates CSS-compatible strings from object trees. The resulting strings can be used directly in dynamic stylesheets as well as HTMLElement.style
.
> stringify({ color: "red" })
"color:red"
Use strings as keys to represent complex selectors, property names, and values.
> stringify({
"*": {
"margin": 0,
"padding": 0,
"box-sizing": "border-box"
}
})
"*{margin:0;padding:0;box-sizing:border-box}"
If a declaration has an object as its value, it will be treated as a rule with its own selector and declarations.
> stringify({
nav: {
display: "flex",
a: {
color: "inherit"
}
}
})
"nav{display:flex;a{color:inherit}}"
FAQs
create CSS-compatible strings from object trees
The npm package css-string receives a total of 0 weekly downloads. As such, css-string popularity was classified as not popular.
We found that css-string demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.