Package Exports
- type-is-plain-object
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (type-is-plain-object) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
type-is-plain-object
A utility to test if a 'value' has a type of 'Object' and it was created by the Object constructor.
Installation
Using npm
npm i type-is-plain-objectUsage
In Node (CommonJS)
const isPlainObject = require('type-is-plain-object');
// on "undefined" -> false
console.log(isPlainObject());
// on "null" -> false
console.log(isPlainObject(null));
// on "number" -> false
console.log(isPlainObject(100));
// on "string" -> false
console.log(isPlainObject('foo'));
// on "boolean" -> false
console.log(isPlainObject(true));
// on "plain object" -> true
console.log(isPlainObject({ a: 100, b: 200 }));
// on "array" -> false
console.log(isPlainObject([1, 2, 3]));
// on "function" -> false
console.log(
isPlainObject(function() {
return 'bar';
})
);In the Browser (ES6 modules):
import isPlainObject from 'type-is-plain-object';Contributing
If you find any issues, feel free to submit a pull request
Author
License
This project is under the MIT License