Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
@dr/bem-helper
Advanced tools
Helper to create BEM-style classnames
npm install @dr/bem-helper
var bem = require("@dr/bem-helper");
// Get all applicable combinations for an element:
var className = bem("dr-module", "list", { expanded: true });
// className === "dr-module__list dr-module__list--expanded"
// Get a single classname for an element:
var className = bem.single("dr-module", "list", { expanded: true });
// className === "dr-module__list--expanded"
// Modifiers with values
// Get all applicable combinations for an element:
var className = bem("dr-module", "list", { expanded: true, rated: 3 });
// className === "dr-module__list dr-module__list--expanded dr-module__list--rated-3"
// Get a single classname for an element:
var className = bem.single("dr-module", "list", { rated: 3 });
// className === "dr-module__list--rated-3"
// Prebinding a helper
var block = "dr-module";
var boundBem = bem.bind(null, block);
// Get all applicable scoped combinations for an element:
var className = boundBem("list", { expanded: true });
// className === "dr-module__list dr-module__list--expanded"
// Get a single scoped classname for an element:
var className = bem.single("list", { expanded: true });
// className === "dr-module__list--expanded"
block
(string) - The block element for the classname.{expanded: true}
> "--expanded"
, {rating: 3}
> "--rating-3"
.FAQs
Helper functions to create BEM-style classnames
The npm package @dr/bem-helper receives a total of 154 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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.