isPlainObject
Check if a value is a plain JavaScript object (not array, null, etc).
#data
#type-guard
#utility
export const isPlainObject = (value: unknown): value is Record<string, unknown> => Object.prototype.toString.call(value) === '[object Object]';
// UsageisPlainObject({}); // trueisPlainObject({ a: 1 }); // trueisPlainObject([]); // falseisPlainObject(null); // falseisPlainObject(new Date); // false