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

Commit 6e89ba1

Browse files
author
blond
committed
docs(constructor): join constructor with BEM Entity Name section
1 parent 33bed0f commit 6e89ba1

File tree

1 file changed

+26
-29
lines changed

1 file changed

+26
-29
lines changed

README.md

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,32 @@ entityName.isEqual(new BemEntityName({ block: 'button' })); // fal
4646
entityName.isEqual(new BemEntityName({ block: 'button', elem: 'text' })); // true
4747
```
4848

49-
BEM Entity Name
50-
---------------
49+
API
50+
---
51+
52+
* [constructor({ block, elem, mod })](#constructor-block-elem-mod-)
53+
* [block](#block)
54+
* [elem](#elem)
55+
* [mod](#mod)
56+
* [id](#id)
57+
* [type](#type)
58+
* [isSimpleMod()](#issimplemod)
59+
* [isEqual(entityName)](#isequalentityname)
60+
* [toString()](#tostring)
61+
* [valueOf()](#valueof)
62+
* [toJSON()](#tojson)
63+
* [#isBemEntityName(entityName)](#isbementitynameentityname)
64+
* [#create(object)](#createobject)
65+
66+
### constructor({ block, elem, mod })
67+
68+
Parameter | Type | Description
69+
----------|----------|------------------------------
70+
`block` | `string` | The block name of entity.
71+
`elem` | `string` | The element name of entity.
72+
`mod` | `string`, `object` | The modifier of entity.<br><br> If specified value is `string` then it will be equivalent to `{ name: string, val: true }`. Optional.
73+
`mod.name`| `string` | The modifier name of entity.
74+
`mod.val` | `string`, `true` | The modifier value of entity. Optional.
5175

5276
BEM entities can be defined with a help of JS object with the following fields:
5377

@@ -87,33 +111,6 @@ new BemEntityName({
87111
});
88112
```
89113

90-
API
91-
---
92-
93-
* [constructor({ block, elem, mod })](#constructor-block-elem-mod-)
94-
* [block](#block)
95-
* [elem](#elem)
96-
* [mod](#mod)
97-
* [id](#id)
98-
* [type](#type)
99-
* [isSimpleMod()](#issimplemod)
100-
* [isEqual(entityName)](#isequalentityname)
101-
* [toString()](#tostring)
102-
* [valueOf()](#valueof)
103-
* [toJSON()](#tojson)
104-
* [#isBemEntityName(entityName)](#isbementitynameentityname)
105-
* [#create(object)](#createobject)
106-
107-
### constructor({ block, elem, mod })
108-
109-
Parameter | Type | Description
110-
----------|----------|------------------------------
111-
`block` | `string` | The block name of entity.
112-
`elem` | `string` | The element name of entity.
113-
`mod` | `string`, `object` | The modifier of entity.<br><br> If specified value is `string` then it will be equivalent to `{ name: string, val: true }`. Optional.
114-
`mod.name`| `string` | The modifier name of entity.
115-
`mod.val` | `string`, `true` | The modifier value of entity. Optional.
116-
117114
### block
118115

119116
The name of block to which this entity belongs.

0 commit comments

Comments
 (0)