Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bemmy

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bemmy - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "bemmy",
"version": "1.0.0",
"version": "1.0.1",
"description": "Dependency-free utility to compose CSS classnames following the BEM convention.",

@@ -5,0 +5,0 @@ "author": {

@@ -18,27 +18,24 @@ # bemmy

const bem = bemmy('component')
const bem = bemmy('component');
bem() // block
bem(); // block
// -> 'component'
bem('content') // block + element
bem('content'); // block + element
// -> 'component__content'
bem(null, 'disabled') // block + modifier
bem(null, 'disabled'); // block + modifier
// -> 'component component--disabled'
bem('content', 'disabled') // block + element + modifier
bem('content', 'disabled'); // block + element + modifier
// -> 'component__content component__content--disabled'
bem('content', { tall: true, green: true }) // modifier object
// -> 'component__content component__content--tall component__content--green'
bem('content', { tall: true, green: false }); // modifier object
// -> 'component__content component__content--tall
bem('content', ['tall', 'green']) // modifier array
// -> 'component__content component__content--tall component__content--green'
bem('content', ['tall']); // modifier array
// -> 'component__content component__content--tall'
bem('content', { tall: false, green: undefined, wide: true custom: 1 > 2 }) // dynamic modifiers
// -> 'component__content component__content--wide'
bem(null, null, 'some-class', 'another-class') // // additional classes
bem(null, null, 'some-class', 'another-class'); // // additional classes
// -> 'component some-class another-class'
```
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