@uiw/react-native
Version:
UIW for React Native
22 lines • 553 B
JavaScript
const opt = Object.prototype.toString;
export function isArray(obj) {
return opt.call(obj) === '[object Array]';
}
export function isObject(obj) {
return opt.call(obj) === '[object Object]';
}
export function isString(obj) {
return opt.call(obj) === '[object String]';
}
export function isNumber(obj) {
return opt.call(obj) === '[object Number]' && obj === obj;
}
export function isRegExp(obj) {
return opt.call(obj) === '[object RegExp]';
}
export function isObjectEmpty(obj) {
for (let _key in obj) {
return false;
}
return true;
}