Would you like to clone this notebook?

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


@bem.decl: using assign function

node v10.21.0
version: 1.0.1
Fills missed BEM cell fields with the fields from the scope except the `layer` field.
const bemDecl = require('@bem/sdk.decl'); bemDecl.assign( { entity: { elem: '1'}, tech: 'js'}, { entity: { block: 'a'}} ).valueOf();
bemDecl.assign( { tech: 'js'}, { entity: { block: 'a'}, tech: 'css'} ).valueOf();
bemDecl.assign( { entity: { mod: { name: 'test'}}}, { entity: { block: 'a', elem: '1'}, tech: 'js' } ).valueOf();
// If you pass only a `block` field, it will dominate over the other BemEntityName fields. bemDecl.assign( { entity: { block: 'a'}}, { entity: { block: 'b', elem: '1'}, tech: 'js' } ).valueOf();

no comments

    sign in to comment