New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

easy-bem

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easy-bem

Easy BEM class name generator

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Easy BEM class name generator

Simple and fast BEM class names generator.

NPM

Fork of bem-cn-fast that uses another delimiters (personally I like them more):

  • The element name is separated from the block name by a double underscore (__)
  • The modifier name is separated from the block or element name by a double dash (--)
  • The modifier value is separated from the modifier name by a single underscore (_)

Install

npm install --save easy-bem
yarn add easy-bem

Usage

import bem from 'easy-bem';
const b = bem('block');

b(); // -> 'block'
b('element'); // -> 'block__element'
b({ mod1: true, mod2: 'some-value' }); // -> 'block--mod1 block--mod2_some-value'
b('element', { mod1: true }); // -> 'block__element--mod1'

Keywords

FAQs

Package last updated on 28 Feb 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc