Files
codeql-action/node_modules/@octokit/request/dist-src/is-plain-object.js
Angela P Wen 2e7a05cddb Bump octokit/plugin-retry to v7.1.4
So that `octokit/request-error` can be bumped.
2025-02-25 14:55:06 -08:00

12 lines
514 B
JavaScript

function isPlainObject(value) {
if (typeof value !== "object" || value === null) return false;
if (Object.prototype.toString.call(value) !== "[object Object]") return false;
const proto = Object.getPrototypeOf(value);
if (proto === null) return true;
const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
}
export {
isPlainObject
};