• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

LICENSEH A D01-Jan-19701.1 KiB2217

README.mdH A D01-Jan-19702.9 KiB11273

README.md

1# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat)](https://travis-ci.org/jonschlinkert/isobject)
2
3Returns true if the value is an object and not an array or null.
4
5## Install
6
7Install with [npm](https://www.npmjs.com/):
8
9```sh
10$ npm install isobject --save
11```
12
13Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor.
14
15## Install
16
17Install with [npm](https://www.npmjs.com/):
18
19```sh
20$ npm install isobject
21```
22
23Install with [bower](http://bower.io/)
24
25```sh
26$ bower install isobject
27```
28
29## Usage
30
31```js
32var isObject = require('isobject');
33```
34
35**True**
36
37All of the following return `true`:
38
39```js
40isObject({});
41isObject(Object.create({}));
42isObject(Object.create(Object.prototype));
43isObject(Object.create(null));
44isObject({});
45isObject(new Foo);
46isObject(/foo/);
47```
48
49**False**
50
51All of the following return `false`:
52
53```js
54isObject();
55isObject(function () {});
56isObject(1);
57isObject([]);
58isObject(undefined);
59isObject(null);
60```
61
62## Related projects
63
64You might also be interested in these projects:
65
66[merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep)
67
68* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow)
69* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object)
70* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of)
71
72## Contributing
73
74Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/isobject/issues/new).
75
76## Building docs
77
78Generate readme and API documentation with [verb](https://github.com/verbose/verb):
79
80```sh
81$ npm install verb && npm run docs
82```
83
84Or, if [verb](https://github.com/verbose/verb) is installed globally:
85
86```sh
87$ verb
88```
89
90## Running tests
91
92Install dev dependencies:
93
94```sh
95$ npm install -d && npm test
96```
97
98## Author
99
100**Jon Schlinkert**
101
102* [github/jonschlinkert](https://github.com/jonschlinkert)
103* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
104
105## License
106
107Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
108Released under the [MIT license](https://github.com/jonschlinkert/isobject/blob/master/LICENSE).
109
110***
111
112_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 25, 2016._