UNPKG

679 BJavaScriptView Raw
1/*
2 whenx v0.2.0
3 https://github.com/cdll/whenx
4 Released under the MIT License.
5*/var whenx=function(){var a=(a,b={})=>new Promise((c,d)=>{const e=wx[a](Object.assign(b,{success:a=>c(a),fail:a=>d(a),complete:b.complete}));if(b.progress)if("function"==typeof b.progress){Function.call(b.progress,e)}else console.warn(`[whenx]progress must be a function to call with task but not: ${typeof b.progress}`)});const b=function(){let b={};for(let c in wx)"function"==typeof wx[c]&&(b[c]=b=>a.call(this,c,b));return b}();var c=b,d={default:c,__moduleExports:c};let e=d;return e.whenx=d,e.thenx={default:a,__moduleExports:a},e.version="0.2.0",e}();
6//# sourceMappingURL=whenx.min.js.map