Urara-Blog/node_modules/.pnpm-store/v3/files/4e/9723e46ecd97092278e7feab3d07813f29b0a176ae1e0a7e0fe8b54fd1cd3ecb5d67f0c96fc43516f773ce86f6f69ee7d7381d88bd253b4bfd72ff0cf39820
2022-08-14 01:14:53 +08:00

20 lines
454 B
Text

export function objectOrFunction(x) {
return typeof x === 'function' || (typeof x === 'object' && x !== null);
}
export function isFunction(x) {
return typeof x === 'function';
}
export function isMaybeThenable(x) {
return typeof x === 'object' && x !== null;
}
let _isArray;
if (!Array.isArray) {
_isArray = x => Object.prototype.toString.call(x) === '[object Array]';
} else {
_isArray = Array.isArray;
}
export const isArray = _isArray;