![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@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
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.