How @bem/sdk.naming.entity works?
const bemNaming = require('@bem/sdk.naming.entity');
// Write a BEM entity name to parse.
bemNaming.parse('my-block__my-element');
// Define a BEM entity name to stringify.
const myEntity = {
block: 'my-block',
elem: 'my-element',
mod: {
name: 'my-modifier',
val: 'some-value'
}
};
bemNaming.stringify(myEntity)
no comments