mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 20:22:26 +03:00
bbaf619f63
swc_bundler: - [x] Fix wrapped esms. (denoland/deno#9307) - [x] Make test secure.
30 lines
764 B
TypeScript
30 lines
764 B
TypeScript
// Loaded from https://cdn.skypack.dev/-/is-plain-object@v5.0.0-8mrVMp9y5RYdpZYGe1Tt/dist=es2020,mode=imports/optimized/is-plain-object.js
|
|
|
|
|
|
/*!
|
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
*
|
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
* Released under the MIT License.
|
|
*/
|
|
function isObject(o) {
|
|
return Object.prototype.toString.call(o) === "[object Object]";
|
|
}
|
|
function isPlainObject(o) {
|
|
var ctor, prot;
|
|
if (isObject(o) === false)
|
|
return false;
|
|
ctor = o.constructor;
|
|
if (ctor === void 0)
|
|
return true;
|
|
prot = ctor.prototype;
|
|
if (isObject(prot) === false)
|
|
return false;
|
|
if (prot.hasOwnProperty("isPrototypeOf") === false) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
export {isPlainObject};
|
|
export default null;
|