alejandro.alvarez5 70bb213259 articulo | 3 years ago | |
---|---|---|
.. | ||
LICENSE | 3 years ago | |
README.md | 3 years ago | |
index.js | 3 years ago | |
package.json | 3 years ago | |
test.js | 3 years ago |
Is the value an object or an array but not null or RegExp?
$ yarn add objectorarray
import objectorarray from 'objectorarray'
All of the following return true:
objectorarray({})
objectorarray([])
objectorarray(Object.create({}))
objectorarray(Object.create(Object.prototype))
objectorarray(Object.create(null))
objectorarray(new Foo)
All of the following return false:
objectorarray()
objectorarray(function () {})
objectorarray(1)
objectorarray(/foo/)
objectorarray(undefined)
objectorarray(null)
MIT