create project
This commit is contained in:
26
kitabcitab/node_modules/next/dist/shared/lib/is-plain-object.js
generated
vendored
Normal file
26
kitabcitab/node_modules/next/dist/shared/lib/is-plain-object.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.getObjectClassLabel = getObjectClassLabel;
|
||||
exports.isPlainObject = isPlainObject;
|
||||
function getObjectClassLabel(value) {
|
||||
return Object.prototype.toString.call(value);
|
||||
}
|
||||
function isPlainObject(value) {
|
||||
if (getObjectClassLabel(value) !== '[object Object]') {
|
||||
return false;
|
||||
}
|
||||
const prototype = Object.getPrototypeOf(value);
|
||||
/**
|
||||
* this used to be previously:
|
||||
*
|
||||
* `return prototype === null || prototype === Object.prototype`
|
||||
*
|
||||
* but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.
|
||||
*
|
||||
* It was changed to the current implementation since it's resilient to serialization.
|
||||
*/ return prototype === null || prototype.hasOwnProperty('isPrototypeOf');
|
||||
}
|
||||
|
||||
//# sourceMappingURL=is-plain-object.js.map
|
||||
Reference in New Issue
Block a user