Stringify using origin convention

node v8.17.0
version: 1.0.1
endpointsharetweet
const originNaming = require('@bem/sdk.naming.presets/origin'); const stringify = require('@bem/sdk.naming.entity.stringify')(originNaming); stringify({ block: 'my-block', mod: 'my-modifier' });
stringify({ block: 'my-block', mod: { name: 'my-modifier'}});
stringify({ block: 'my-block', mod: { name: 'my-modifier', val: 'some-value'}});
stringify({ block: 'my-block', elem: 'my-element' });
stringify({ block: 'my-block', elem: 'my-element', mod: 'my-modifier'});
stringify({ block: 'my-block', elem: 'my-element', mod: { name: 'my-modifier', val: 'some-value'}});
Loading…

no comments

    sign in to comment