@h7ghost/make-bem
TypeScript icon, indicating that this package has built-in type declarations

0.3.3 • Public • Published

make-bem

Library for generating class names string to use as props in html/jsx.

Usage example

const bem = makeBEM("block");

console.log(bem()); // "block"
console.log(bem(null, ["hello"])); // "block block--hello";

const cls = bem("element",
  {
    "foo": true,
    "bar": false,
    "object": {}
  },
  ["array"]
);

console.log(cls); // "block__element block__element--foo block__element--object block__element--array"

Readme

Keywords

none

Package Sidebar

Install

npm i @h7ghost/make-bem

Weekly Downloads

1

Version

0.3.3

License

none

Unpacked Size

7.27 kB

Total Files

12

Last publish

Collaborators

  • h7ghost