@haoxh/redux-dva
Version:
dva redux中间件的实现
9 lines • 309 B
JavaScript
export function isGenerator(obj) {
return 'function' === typeof obj.next && 'function' === typeof obj.throw
}
export function isPromise(obj){
return obj instanceof Promise || 'function' === typeof obj.then
}
export function isObject(value){
return ({}).toString.call(value) === '[object Object]'
}