Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@fesk/bem-js
Advanced tools
Installation:
$ yarn add digirati-bem-js
Usage:
import BEM from 'digirati-bem-js';
// Chaining
BEM.block('foo'); // foo
BEM.block('foo').element('bar'); // foo__bar
// In variable
const foo = BEM.block('foo');
foo.element('bar'); // foo__bar
foo.element('baz'); // foo__baz
foo.modifier('far'); // foo foo--far
foo.element('bar').modifier('baz'); // foo__bar foo__bar--baz
// Using conditions
foo.element('bar').modifier('baz', false); // foo__bar
foo.element('bar').modifier('baz', true); // foo__bar foo__bar--baz
foo.modifier('far', false); // foo
// Shorthand
BEM.b('foo').e('bar').m('baz', true); // foo__bar foo__bar--baz
// Multiple conditions using (https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/every)
foo.element('bar').modifier('baz', [true, true].every(t => !!t)); // foo__bar foo__bar--baz
// Multiple modifiers
BEM.b('foo').e('bar').m({
'baz-1': true,
'baz-2': false,
'baz-3': true
}); // foo__bar foo__bar--baz-1 foo__bar--baz-3
FAQs
BEM helper for generating CSS class names
We found that @fesk/bem-js 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.