export function isString ( str ) { return typeof str === 'string' ; } export function isUndefined ( obj ) { return typeof obj === 'undefined' ; } export function isArray ( obj ) { return Object . prototype . toString . call ( obj ) === '[object Array]' ; } export function isFunction ( func ) { return typeof func === 'function' ; } export function isObject ( obj ) { return typeof obj === 'object' ; } export function isPlainObject ( obj ) { return ( obj && typeof obj === 'object' && Object . prototype . toString . call ( obj ) === '[object Object]' ) ; } export function isPromise ( obj ) { return ( Boolean ( obj ) && ( typeof obj === 'object' || typeof obj === 'function' ) && typeof obj . then === 'function' ) ; } export function isRegExp ( obj ) { return Object . prototype . toString . call ( obj ) === '[object RegExp]' ; }