Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@f/apply-styles
Advanced tools
Apply a style object to a DOM node, optionally diffing against a previous set of styles.
$ npm install @f/apply-styles
var applyStyles = require('@f/apply-styles')
function setAttribute (node, name, value, prevValue) {
if (name === 'style') {
applyStyles(node, value, prevValue)
}
// ...set other kinds of attributes...
}
node
- The DOM node to apply the styles tostyles
- The styles you want to setprevStyles
- Optional, a previous style object to diff against (i.e. remove props that are not set in the current style
)Returns: void
MIT
FAQs
Apply a style object to a DOM node
The npm package @f/apply-styles receives a total of 4 weekly downloads. As such, @f/apply-styles popularity was classified as not popular.
We found that @f/apply-styles 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.