objectorarray

1.0.5 • Public • Published

objectorarray

npm version downloads

Is the value an object or an array but not null or RegExp?

Install

  $ yarn add objectorarray

Usage

 import objectorarray from 'objectorarray'

True

All of the following return true:

  objectorarray({})
  objectorarray([])  
  objectorarray(Object.create({}))
  objectorarray(Object.create(Object.prototype))
  objectorarray(Object.create(null))
  objectorarray(new Foo)

False

All of the following return false:

  objectorarray()
  objectorarray(function () {})
  objectorarray(1)
  objectorarray(/foo/)
  objectorarray(undefined)
  objectorarray(null)

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i objectorarray

Weekly Downloads

3,035,985

Version

1.0.5

License

ISC

Unpacked Size

3.28 kB

Total Files

5

Last publish

Collaborators

  • zhouhancheng