isPlainObject
Checks if value is a plain object, that is, an object created by the Object constructor or one with a [[Prototype]] of null.
API
function isPlainObject(value?: any): value is object;
Usage
import { isPlainObject } from '@jtmdias/js-utilities';
isPlainObject({});
// true
isPlainObject([]);
// false
isPlainObject(null);
// false
isPlainObject(new Date());
// false
isPlainObject('string');
// false
isPlainObject(123);
// false
isPlainObject(Object.create(null));
// true