class Type { static isString ( o ) { return Object . prototype . toString . call ( o ) === '[object String]' ; } static isBoolean ( o ) { return Object . prototype . toString . call ( o ) === '[object Boolean]' ; } static isUndefined ( o ) { return Object . prototype . toString . call ( o ) === '[object Undefined]' ; } static isNull ( o ) { return Object . prototype . toString . call ( o ) === '[object Null]' ; } static isNumber ( o ) { return Object . prototype . toString . call ( o ) === '[object Number]' ; } static isNum ( o ) { return /^\d+$/ . test ( o ) ; } static isFunction ( o ) { return Object . prototype . toString . call ( o ) === '[object Function]' ; } static isArray ( o ) { return Object . prototype . toString . call ( o ) === '[object Array]' ; } static isObject ( o ) { return Object . prototype . toString . call ( o ) === '[object Object]' ; } static isDate ( o ) { return Object . prototype . toString . call ( o ) === '[object Date]' ; } static isRegExp ( o ) { return Object . prototype . toString . call ( o ) === '[object RegExp]' ; } static isPromise ( o ) { return Object . prototype . toString . call ( o ) === '[object Promise]' ; } static isFile ( o ) { return Object . prototype . toString . call ( o ) === '[object File]' ; } static isError ( o ) { return Object . prototype . toString . call ( o ) === '[object Error]' ; } static isEmpty ( o ) { return o === undefined || o === null ; } static isEmptyObject ( o ) { if ( Type . isObject ( o ) ) { if ( Object . keys ( o ) . length === 0 ) { return true ; } return false ; } return false ; } } export default Type ;