UNPKG

@uiw/react-native

Version:
22 lines 553 B
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; }