x-is-object

0.1.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i x-is-object

Weekly Downloads

3,614

Version

0.1.0

License

none

Last publish

Collaborators

  • mattesch