/*! * extend-promise v0.0.6 * Homepage https://github.com/cnwhy/extend-promise#readme * License BSD-2-Clause */ !function e(t,n,r){function o(u,f){if(!n[u]){if(!t[u]){var c="function"==typeof require&&require;if(!f&&c)return c(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var s=n[u]={exports:{}};t[u][0].call(s.exports,function(e){var n=t[u][1][e];return o(n?n:e)},s,s.exports,e,t,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u0?+t:0),function(n){var r,o=h.defer(),f=0,s=function(i){var c=n[i];h.resolve(c).then(function(n){"undefined"!=typeof t?r.push(n):r[i]=n,(0==--f||!e&&t&&r.length>=t)&&o.resolve(r)},function(e){u(t)?o.reject(e):0==--f&&o.resolve(r)}),f++};if(i(n)){r=[],0==n.length&&o.resolve(r);for(var a=0;a=0?+t:0,o(!1,t)(e)}),r("map")&&(h.map=function(e,t,n){function r(){if(c0&&c