Would you like to clone this notebook?

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

Cancel

naming.entity: use another preset as default

node v10.24.1
version: 1.0.2
endpointsharetweet
const createBemNaming = require('@bem/sdk.naming.entity'); const myNamingOptions = { preset: 'two-dashes', delims: { mod: { val: '=' } } }; const myNaming = createBemNaming(myNamingOptions); // Parse a BEM entity name to test created preset. 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);
Loading…

no comments

    sign in to comment