Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
@bem.decl: stringify a set of BEM cells
node v10.24.1
version:
1.0.0
endpoint
share
tweet
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