type-is-object
A utility to check if value
is not null
and its type is object
.
Installation
Using npm
npm i type-is-object
Usage
In Node (CommonJS)
const isObject = ; // on "undefined" -> falseconsole; // on "null" -> falseconsole; // on "number" -> falseconsole; // on "string" -> falseconsole; // on "boolean" -> falseconsole; // on "plain object" -> trueconsole; // on "array" -> trueconsole; // on "function" -> trueconsole;
In the Browser (ES6 modules):
;
Contributing
If you find any issues, feel free to submit a pull request
Author
License
This project is under the MIT License