mirror of
https://github.com/github/codeql-action.git
synced 2025-12-27 01:30:10 +08:00
I explicitly had to downgrade "@octokit/plugin-retry" to "^6.0.0". Other dependencies were upgraded.
12 lines
514 B
JavaScript
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
|
|
};
|