Update code
This commit is contained in:
13
dev-assistant-mcp/node_modules/formdata-node/lib/esm/isPlainObject.js
generated
vendored
Normal file
13
dev-assistant-mcp/node_modules/formdata-node/lib/esm/isPlainObject.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
const getType = (value) => (Object.prototype.toString.call(value).slice(8, -1).toLowerCase());
|
||||
function isPlainObject(value) {
|
||||
if (getType(value) !== "object") {
|
||||
return false;
|
||||
}
|
||||
const pp = Object.getPrototypeOf(value);
|
||||
if (pp === null || pp === undefined) {
|
||||
return true;
|
||||
}
|
||||
const Ctor = pp.constructor && pp.constructor.toString();
|
||||
return Ctor === Object.toString();
|
||||
}
|
||||
export default isPlainObject;
|
||||
Reference in New Issue
Block a user