Skip to content
This repository was archived by the owner on Feb 4, 2018. It is now read-only.

Commit 6302109

Browse files
author
blond
committed
docs(belongsTo): use simple mod in example
1 parent 53d83ae commit 6302109

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,7 @@ const BemEntityName = require('@bem/entity-name');
241241

242242
const buttonName = new BemEntityName({ block: 'button' });
243243
const buttonTextName = new BemEntityName({ block: 'button', elem: 'text' });
244-
const buttonTextBoldName = new BemEntityName(
245-
{ block: 'button', elem: 'text', mod: { name: 'bold', val: true } }
246-
);
244+
const buttonTextBoldName = new BemEntityName({ block: 'button', elem: 'text', mod: 'bold' });
247245

248246
buttonTextName.belongsTo(buttonName); // true
249247
buttonName.belongsTo(buttonTextName); // false

index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,7 @@ class BemEntityName {
318318
*
319319
* const buttonName = new BemEntityName({ block: 'button' });
320320
* const buttonTextName = new BemEntityName({ block: 'button', elem: 'text' });
321-
* const buttonTextBoldName = new BemEntityName(
322-
* { block: 'button', elem: 'text', mod: { name: 'bold', val: true } }
323-
* );
321+
* const buttonTextBoldName = new BemEntityName({ block: 'button', elem: 'text', mod: 'bold' });
324322
*
325323
* buttonTextName.belongsTo(buttonName); // true
326324
* buttonName.belongsTo(buttonTextName); // false

0 commit comments

Comments
 (0)