naming.entity: using the specified naming convention
const createBemNaming = require('@bem/sdk.naming.entity');
const myEntity = {
block: 'my-block',
elem: 'my-element',
mod: {
name: 'my-modifier',
val: 'some-value'
}
};
// Create the new instance from the `two-dashes` preset.
const twoDashes = createBemNaming('two-dashes');
twoDashes.stringify(myEntity);
// Create an instance from the `react` preset.
const react = createBemNaming('react');
react.stringify(myEntity);
no comments