initial commit
This commit is contained in:
16
server/node_modules/jose/dist/browser/lib/is_object.js
generated
vendored
Normal file
16
server/node_modules/jose/dist/browser/lib/is_object.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
function isObjectLike(value) {
|
||||
return typeof value === 'object' && value !== null;
|
||||
}
|
||||
export default function isObject(input) {
|
||||
if (!isObjectLike(input) || Object.prototype.toString.call(input) !== '[object Object]') {
|
||||
return false;
|
||||
}
|
||||
if (Object.getPrototypeOf(input) === null) {
|
||||
return true;
|
||||
}
|
||||
let proto = input;
|
||||
while (Object.getPrototypeOf(proto) !== null) {
|
||||
proto = Object.getPrototypeOf(proto);
|
||||
}
|
||||
return Object.getPrototypeOf(input) === proto;
|
||||
}
|
||||
Reference in New Issue
Block a user