
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@dr/bem-helper
Advanced tools
Helper functions to create BEM-style classnames
npm install @dr/bem-helper
import bem from "@dr/bem-helper";
var className = bem("block", "element", { modifier: true });
// className = "block__element block__element--modifier"
A function that creates all applicable combinations of classnames for an element scoped to a block in BEM-style format.
block (string) - The block element for the classname....args (string|object) - Optional. Any number of the following arguments are allowed:
element (string) - Optional.modifier (object) - Optional. Keys are used for modifier names. Values determine whether to turn the modifier off (false, "", null or undefined) or on - either through true or a value which will be appended to the modifier name; {modifier: true} -> "--modifier", {modifier: "value"} -> "--modifier-value". Should not follow a previous modifier argument.
var className = bem("block", "element");
// className === "block__element"
var className = bem("block", { modifier: true });
// className === "block block--modifier"
var className = bem("block", "element", { modifier: "value", modifier2: false });
// className === "block__element block__element--modifier-value"
var boundBem = bem.bind(null, "block");
var className = boundBem("element", { modifier: true });
// className === "block__element block__element--modifier"
FAQs
Helper functions to create BEM-style classnames
The npm package @dr/bem-helper receives a total of 381 weekly downloads. As such, @dr/bem-helper popularity was classified as not popular.
We found that @dr/bem-helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 55 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
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.