UNPKG

ts-japi

Version:

A highly-modular (typescript-friendly)-framework agnostic library for serializing data to the JSON:API specification

23 lines 703 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isPlainObject = isPlainObject; const is_object_1 = require("./is-object"); function isPlainObject(o) { if (!(0, is_object_1.isObject)(o)) { return false; } // If constructor was modified if (typeof o.constructor !== "function") { return false; } // If prototype was modified if (!(0, is_object_1.isObject)(o.constructor.prototype)) { return false; } // eslint-disable-next-line no-prototype-builtins if (!Object.hasOwn(o.constructor.prototype, "isPrototypeOf")) { return false; } return true; } //# sourceMappingURL=is-plain-object.js.map