x-is-object
v0.1.0
Published
Simple proper object test
Downloads
18,824
Readme
x-is-object
Simple proper object test - all objects that inherit Object except null
Example
var isObject = require("x-is-object")
isObject({})
// -> true
isObject([])
// -> true
isObject(/.*/)
// -> true
isObject(new RegExp(".*"))
// -> true
isObject(function () {})
// -> true
isObject(new Date())
// -> true
isObject(new String("hello"))
// -> true
isObject("hello")
// -> false
isObject("")
// -> false
isObject(9)
// -> false
isObject(true)
// -> false
isObject(null)
// -> false
isObject(undefined)
// -> false
Installation
npm install x-is-object
Contributors
- Matt-Esch