naming.entity: using the specified naming convention

node v10.16.0
version: 1.0.2
endpointsharetweet
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);
Loading…

no comments

    sign in to comment