bem-entity-name
v0.0.2
Published
bem-entity-name ===============
Downloads
93
Readme
bem-entity-name
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.