function defer() {
let ret = {
promise: null,
resolve: null,
reject: null
}
ret.promise = new Promise(function(resolve, reject) {
ret.resolve = resolve
ret.reject = reject
})
return ret
}
export default defer
function deferLodash(func, ...args) {
if (typeof func != 'function') {
throw new TypeError('Expected a function')
}
return setTimeout(func, 1, ...args)
}
export default deferLodash