bem-entity-name

0.0.2 • Public • Published

bem-entity-name

NPM Status Travis Status Coverage Status

Install

$ npm install --save bem-entity-name

Usage

const BemEntityName = require('bem-entity-name');
 
const entityName = new BemEntityName({ block: 'button', elem: 'text' });
 
console.log(entityName.block); // button
console.log(entityName.elem);  // text
console.log(entityName.mod);   // undefined
 
console.log(entityName.id);   // button__elem
console.log(entityName.type); // elem
 
console.log(entityName.isEqual({ block: 'button' }));               // false
console.log(entityName.isEqual({ block: 'button', elem: 'text' })); // true

License

Code and documentation © 2016 YANDEX LLC. Code released under the Mozilla Public License 2.0.

/bem-entity-name/

    Package Sidebar

    Install

    npm i bem-entity-name

    Weekly Downloads

    3

    Version

    0.0.2

    License

    MPL-2.0

    Last publish

    Collaborators

    • blond
    • qfox