This repository has been archived by the owner on Feb 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Strict mod value #80
Milestone
Comments
Closed
What about: const entityName3 = BemEntityName.create({ block: entityName1, elem: entityName2, mod: { name: entityName1, val: entityName2 } });
// BemEntityName { block: 'block_mod_42', elem: 'block_mod_block_mod_42', mod: { name: 'block_mod_42', val: 'block_mod_block_mod_42' } } |
|
|
Coercion to string with Example: const bemNaming = require('@bem/naming');
const BemEntityName = require('@bem/entity-name');
const entityName1 = BemEntityName.create({ block: 'block', mod: { name: 'mod', val: 'val' } });
const entityName2 = BemEntityName.create({ block: 'block', mod: { name: 'mod', val: entityName1 } });
// BemEntityName { block: 'block', mod: { name: 'mod', val: 'block_mod_val' } }
const str = bemNaming.stringify(entityName2); // block_mod_block_mod_val
bemNaming.parse(str); // undefined But I think we should not handle this case (validate string) because value can be any It may be necessary add validate to |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
String
ortrue
.Actual:
Expected:
bem-naming
logic with mod valfalse
inBemEntityName.create()
:Actual:
Expected:
BemEntityName.create()
Actual:
Expected:
The text was updated successfully, but these errors were encountered: