
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
@flourish/js2css
Advanced tools
Write CSS with D3-style selection syntax.
select("h1")
.style("color", "red")
.style("font-size", "1.25rem");
// h1 {
// color: red;
// font-size: 1.25rem;
// }
Install js2css with NPM npm install -s @flourish/js2css
.
Import and initialise js2css in your project, and create styles.
import Stylesheet from "@flourish/js2css";
var styles = new Stylesheet();
styles.select("h1") // h1 {...}
.style("color", "red")
.style("font-size", "1.2rem")
.style("font-weight", "bold")
.style("display", function() {
return window.innerWidth < 400 ? "none" : null
})
.select("span") // h1 span {...}
.style("font-weight", "normal");
document.head.querySelector("#my_style_container").innerHTML = styles.print(); // Add styles to <style> tag in head
styles.clear(); // Clear the styles
select(selector)
Create new CSS selection. Select can be called directly on the js2css object, or on an existing declaration to create nested CSS selection.
style(style_attribute, value)
Create new style for current selection. The value can be a string, number or a function.
print()
Returns the parsed CSS string
clear()
Clears the CSS string
FAQs
Flourish module to convert js inline styles to stylesheet
The npm package @flourish/js2css receives a total of 394 weekly downloads. As such, @flourish/js2css popularity was classified as not popular.
We found that @flourish/js2css demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 open source maintainers 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
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.