Stringify using origin convention
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'}});
no comments