Skip to content

Commit

Permalink
docs: isBemCell method
Browse files Browse the repository at this point in the history
  • Loading branch information
qfox committed Jan 17, 2017
1 parent 0472cfd commit 2bcd411
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Expand Up @@ -54,6 +54,7 @@ API
* [tech](#tech)
* [layer](#layer)
* [id](#id)
* [isBemCell(cell)](#isbemcellcell)

### constructor(obj)

Expand Down Expand Up @@ -129,6 +130,26 @@ const cell = new BemCell({
cell.id; // ➜ "button__text@desktop.css"
```

### isBemCell(cell)

Determines whether specified cell is instance of BemCell.

Parameter | Type | Description
----------|-----------------|-----------------------
`cell` | `BemCell` | The cell to check.

```js
const BemCell = require('@bem/cell');
const BemEntityName = require('@bem/entity-name');

const cell = new BemCell({
entity: new BemEntityName({ block: 'button', elem: 'text' })
});

BemCell.isBemCell(cell); // true
BemCell.isBemCell({}); // false
```

License
-------

Expand Down

0 comments on commit 2bcd411

Please sign in to comment.