0.1.0 • Published 10 years ago

x-is-object v0.1.0

Weekly downloads
8,310
License
-
Repository
github
Last release
10 years ago

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

MIT Licenced