@citrus327/bem-namer
A simplified version of BEM name generator
Installation
pnpm install @citrus327/bem-namer
Usage
import { bem } from '@citrus327/bem-namer';
const { b, m } = bem("user-card")
expect(b()).toBe("user-card")
expect(b("container")).toBe("user-card-container")
expect(m("primary")).toBe("user-card--primary")
expect(m("container", "primary")).toBe("user-card-container--primary")