is-real-object

Returns
true
if a value is any type of object, but not an array. Browserify-ready.
Why?!
Yea, that's it! Yea, it's so simple as !isArray && isObject
. Because all of the others checks that given value is-object or is-plain-object, or even is-extendable and is-obj. And last two are absolutely the same things - returns true
if a value is any type of object, including array-ish values.
That being said, just it isn't okey for me to pass array value as options
object for example.
Install
npm i is-real-object --save
Usage
For more use-cases see the tests
const isRealObject =
true
returns // it is object! // it is object! // it is object!
false
returns )
Related
- is-extendable: Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended,… more
- is-obj: Check if a value is an object
- is-plain-obj: Check if a value is a plain object
- is-plain-object: Returns true if an object was created by the
Object
constructor. - isobject: Returns true if the value is an object and not an array or null.
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.