isobject
Advanced tools
Comparing version 3.0.1 to 4.0.0
@@ -1,5 +0,3 @@ | ||
export = isObject; | ||
declare function isObject(val: any): boolean; | ||
declare namespace isObject {} | ||
export default isObject; |
@@ -8,6 +8,4 @@ /*! | ||
'use strict'; | ||
module.exports = function isObject(val) { | ||
export default function isObject(val) { | ||
return val != null && typeof val === 'object' && Array.isArray(val) === false; | ||
}; |
{ | ||
"name": "isobject", | ||
"description": "Returns true if the value is an object and not an array or null.", | ||
"version": "3.0.1", | ||
"version": "4.0.0", | ||
"homepage": "https://github.com/jonschlinkert/isobject", | ||
@@ -21,5 +21,7 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"index.d.ts", | ||
"index.cjs.js", | ||
"index.js" | ||
], | ||
"main": "index.js", | ||
"main": "index.cjs.js", | ||
"module": "index.js", | ||
"engines": { | ||
@@ -29,8 +31,12 @@ "node": ">=0.10.0" | ||
"scripts": { | ||
"test": "mocha" | ||
"build": "rollup -i index.js -o index.cjs.js -f cjs", | ||
"test": "mocha -r esm", | ||
"prepublish": "npm run build" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"esm": "^3.2.22", | ||
"gulp-format-md": "^0.1.9", | ||
"mocha": "^2.4.5" | ||
"mocha": "^2.4.5", | ||
"rollup": "^1.10.1" | ||
}, | ||
@@ -37,0 +43,0 @@ "keywords": [ |
@@ -1,5 +0,7 @@ | ||
# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM monthly downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![NPM total downloads](https://img.shields.io/npm/dt/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/isobject) | ||
# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM monthly downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![NPM total downloads](https://img.shields.io/npm/dt/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/isobject) | ||
> Returns true if the value is an object and not an array or null. | ||
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. | ||
## Install | ||
@@ -13,8 +15,2 @@ | ||
Install with [yarn](https://yarnpkg.com): | ||
```sh | ||
$ yarn add isobject | ||
``` | ||
Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor. | ||
@@ -29,12 +25,7 @@ | ||
``` | ||
Install with [bower](https://bower.io/) | ||
```sh | ||
$ bower install isobject | ||
``` | ||
## Usage | ||
```js | ||
var isObject = require('isobject'); | ||
import isObject from 'isobject'; | ||
``` | ||
@@ -71,25 +62,23 @@ | ||
### Related projects | ||
<details> | ||
<summary><strong>Contributing</strong></summary> | ||
* [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 "Extend an object with the properties of additional objects. node.js/javascript util.") | ||
* [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 "Returns true if an object was created by the `Object` constructor.") | ||
* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") | ||
* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") | ||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). | ||
### Contributing | ||
</details> | ||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). | ||
<details> | ||
<summary><strong>Running Tests</strong></summary> | ||
### Contributors | ||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: | ||
| **Commits** | **Contributor** | | ||
| --- | --- | | ||
| 29 | [jonschlinkert](https://github.com/jonschlinkert) | | ||
| 4 | [doowb](https://github.com/doowb) | | ||
| 1 | [magnudae](https://github.com/magnudae) | | ||
| 1 | [LeSuisse](https://github.com/LeSuisse) | | ||
| 1 | [tmcw](https://github.com/tmcw) | | ||
```sh | ||
$ npm install && npm test | ||
``` | ||
### Building docs | ||
</details> | ||
<details> | ||
<summary><strong>Building docs</strong></summary> | ||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ | ||
@@ -103,10 +92,25 @@ | ||
### Running tests | ||
</details> | ||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: | ||
### Related projects | ||
```sh | ||
$ npm install && npm test | ||
``` | ||
You might also be interested in these projects: | ||
* [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 "Extend an object with the properties of additional objects. node.js/javascript util.") | ||
* [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 "Returns true if an object was created by the `Object` constructor.") | ||
* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") | ||
* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") | ||
### Contributors | ||
| **Commits** | **Contributor** | | ||
| --- | --- | | ||
| 30 | [jonschlinkert](https://github.com/jonschlinkert) | | ||
| 8 | [doowb](https://github.com/doowb) | | ||
| 7 | [TrySound](https://github.com/TrySound) | | ||
| 3 | [onokumus](https://github.com/onokumus) | | ||
| 1 | [LeSuisse](https://github.com/LeSuisse) | | ||
| 1 | [tmcw](https://github.com/tmcw) | | ||
| 1 | [ZhouHansen](https://github.com/ZhouHansen) | | ||
### Author | ||
@@ -116,8 +120,9 @@ | ||
* [github/jonschlinkert](https://github.com/jonschlinkert) | ||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) | ||
* [GitHub Profile](https://github.com/jonschlinkert) | ||
* [Twitter Profile](https://twitter.com/jonschlinkert) | ||
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) | ||
### License | ||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). | ||
Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). | ||
Released under the [MIT License](LICENSE). | ||
@@ -127,2 +132,2 @@ | ||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 30, 2017._ | ||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2019._ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
7765
6
22
127
4
1