@bem.decl: stringify a set of BEM cells

node v10.24.1
version: 1.0.0
endpointsharetweet
const BemDecl = require('@bem/sdk.decl'); const BemCell = require('@bem/sdk.cell'); const BemEntityName = require('@bem/sdk.entity-name'); const set = [ new BemCell({ entity: new BemEntityName({ block: 'a' }) }), new BemCell({ entity: new BemEntityName({ block: 'b' }) }) ]; BemDecl.stringify(set, { format: 'enb' });
Stringify in the CommonJS export type.
BemDecl.stringify(set, { format: 'enb', exportType: 'commonjs' });
Stringify using "v1" format.
BemDecl.stringify(set, { format: 'v1' });
Loading…

no comments

    sign in to comment