|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
606 bytes
|
| Line | |
|---|
| 1 | # is-obj [](https://travis-ci.org/sindresorhus/is-obj)
|
|---|
| 2 |
|
|---|
| 3 | > Check if a value is an object
|
|---|
| 4 |
|
|---|
| 5 | Keep in mind that array, function, regexp, etc, are objects in JavaScript.<br>
|
|---|
| 6 | See [`is-plain-obj`](https://github.com/sindresorhus/is-plain-obj) if you want to check for plain objects.
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 | ## Install
|
|---|
| 10 |
|
|---|
| 11 | ```
|
|---|
| 12 | $ npm install --save is-obj
|
|---|
| 13 | ```
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 | ## Usage
|
|---|
| 17 |
|
|---|
| 18 | ```js
|
|---|
| 19 | const isObj = require('is-obj');
|
|---|
| 20 |
|
|---|
| 21 | isObj({foo: 'bar'});
|
|---|
| 22 | //=> true
|
|---|
| 23 |
|
|---|
| 24 | isObj([1, 2, 3]);
|
|---|
| 25 | //=> true
|
|---|
| 26 |
|
|---|
| 27 | isObj('foo');
|
|---|
| 28 | //=> false
|
|---|
| 29 | ```
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 | ## License
|
|---|
| 33 |
|
|---|
| 34 | MIT © [Sindre Sorhus](https://sindresorhus.com)
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.