Skip to content

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

License

Notifications You must be signed in to change notification settings

indentjs/objectorarray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published