UNPKG

@trophyso/node

Version:
19 lines (18 loc) 598 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isPlainObject = void 0; // borrowed from https://github.com/lodash/lodash/blob/master/isPlainObject.js function isPlainObject(value) { if (typeof value !== "object" || value === null) { return false; } if (Object.getPrototypeOf(value) === null) { return true; } let proto = value; while (Object.getPrototypeOf(proto) !== null) { proto = Object.getPrototypeOf(proto); } return Object.getPrototypeOf(value) === proto; } exports.isPlainObject = isPlainObject;