isobject
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -11,4 +11,4 @@ /*! | ||
module.exports = function isObject(val) { | ||
return Object.prototype.toString.call(val) === '[object Object]' | ||
&& typeof val === 'object'; | ||
return val != null && typeof val === 'object' | ||
&& !Array.isArray(val); | ||
}; |
{ | ||
"name": "isobject", | ||
"description": "Returns true if the value is an object and not an array or null.", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"homepage": "https://github.com/jonschlinkert/isobject", | ||
@@ -52,2 +52,2 @@ "author": { | ||
] | ||
} | ||
} |
@@ -38,2 +38,3 @@ # isobject [![NPM version](https://badge.fury.io/js/isobject.svg)](http://badge.fury.io/js/isobject) [![Build Status](https://travis-ci.org/jonschlinkert/isobject.svg)](https://travis-ci.org/jonschlinkert/isobject) | ||
isObject(new Foo); | ||
isObject(/foo/); | ||
``` | ||
@@ -47,3 +48,2 @@ | ||
isObject(); | ||
isObject(/foo/); | ||
isObject(function () {}); | ||
@@ -83,2 +83,2 @@ isObject(1); | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 04, 2015._ | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 13, 2015._ |
4944