Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.


naming.entity: using a custom naming convention

node v10.24.1
version: 1.0.0
const createBemNaming = require('@bem/sdk.naming.entity'); const myNamingOptions = { delims: { mod: { val: '=' } } }; const myNaming = createBemNaming(myNamingOptions); // Parse a BEM entity name to test created instance. myNaming.parse('my-block_my-modifier=some-value');
// Stringify an object representation of the BEM entity name. const myEntity = { block: 'my-block', elem: 'my-element', mod: { name: 'my-modifier', val: 'some-value' } }; myNaming.stringify(myEntity);

no comments

    sign in to comment