@httpx/plain-object
Version:
Fast and lightweight utility functions to check if a value is a plain object.
2 lines • 472 B
JavaScript
var a=t=>{if(t===null||typeof t!="object")return false;let e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null};function n(t,e){if(!a(t))throw e===undefined||typeof e=="string"?new TypeError(e??"Not a PlainObject"):e()}var i=t=>t===Math||t===JSON||t===Atomics;exports.assertPlainObject=n;exports.isPlainObject=a;exports.isStaticBuiltInClass=i;//# sourceMappingURL=index.cjs.map
//# sourceMappingURL=index.cjs.map
;