Socket
Socket
Sign inDemoInstall

async

Package Overview
Dependencies
1
Maintainers
4
Versions
92
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.2 to 2.0.0-alpha.0

apply.js

56

CHANGELOG.md

@@ -0,3 +1,53 @@

# v2.0.0
Lots of changes here! The biggest feature is modularization. You can now `require("async/series")` to only require the `series` function. Every Async library function is available this way. You still can `require("async")` to require the entire library, like you could do before.
We also provide Async as a collection of ES2015 modules. You can now `import {each} from 'async-es'` or `import waterfall from 'async-es/waterfall'`. If you are using only a few Async functions, and are using a ES bundler such as Rollup, this can significantly lower your build size.
Major thanks to [**@Kikobeats**](github.com/Kikobeats), [**@aearly**](github.com/aearly) and [**@megawac**](github.com/megawac) for doing the majority of the modularization work, as well as [**@jdalton**](github.com/jdalton) and [**@Rich-Harris**](github.com/Rich-Harris) for advisory work on the general modularization strategy.
Another one of the general themes of the 2.0 release is standardization of what an "async" function is. We are now more strictly following the node-style continuation passing style. That is, an async function is a function that:
1. Takes a variable number of arguments
2. The last argument is always a callback
3. The callback can accept any number of arguments
4. The first argument passed to the callback will be treated as an error result, if the argument is truthy
5. Any number of result arguments can be passed after the "error" argument
6. The callback is called once and exactly once, either on the same tick or later tick of the JavaScript event loop.
There were several cases where Async accepted some functions that did not strictly have these properties, most notably `auto`, `every`, `some`, and `filter`.
Another theme is performance. We have eliminated internal deferrals in all cases where they make sense. For example, in `waterfall` and `auto`, there was a `setImmediate` between each task -- these deferrals have been removed. A `setImmediate` call can add up to 1ms of delay. This might not seem like a lot, but it can add up if you are using many Async functions in the course of processing a HTTP request, for example. Nearly all asynchronous functions that do I/O already have some sort of deferral built in, so the extra deferral is unnecessary. The trade-off of this change is removing our built-in stack-overflow defense. Many synchronous callback calls in series can quickly overflow the JS call stack. If you do have a function that is sometimes synchronous (calling its callback on the same tick), and are running into stack overflows, wrap it with `async.ensureAsync()`.
## New Features
- Async is now modularized. Individual functions can be `require()`d from the main package. (`require('async/auto')`) (#696)
- Async is also available as a collection of ES2015 modules in the new `async-es` package. (`import {forEachSeries} from 'async-es'`) (#696)
- Added `race`, analogous to `Promise.race()`. It will run an array of async tasks in parallel and will call its callback with the result of the first task to respond. (#568, #1038)
- Added `timeout`, a wrapper for an async function that will make the task time-out after the specified time. (#1007, #1027)
- `constant` supports dynamic arguments -- it will now always use its last argument as the callback. (#1016, #1052)
- `setImmediate` and `nextTick` now support arguments to partially apply to the deferred function, like the node-native versions do. (#940, #1053)
- Added `autoInject`, a relative of `auto` that automatically spreads a task's dependencies as arguments to the task function. (#608, #1055)
- You can now limit the concurrency of `auto` tasks. (#635, #637)
- Added `q.unsaturated` -- callback called when a `queue`'s number of running workers falls below a threshold. (#868, #1030, #1033, #1034)
## Breaking changes
- Calling a callback more than once is considered an error, and an error will be thrown. This had an explicit breaking change in `waterfall`. If you were relying on this behavior, you should more accurately represent your control flow as an event emitter or stream. (#814, #815, #1048, #1050)
- `auto` task functions now always take the callback as the last argument. If a task has dependencies, the `results` object will be passed as the first argument. To migrate old task functions, wrap them with [`_.flip`](https://lodash.com/docs#flip) (#1036, #1042)
- Internal `setImmediate` calls have been refactored away. This may make existing flows vulnerable to stack overflows if you use many synchronous functions in series. Use `ensureAsync` to work around this. (#696, #704, #1049, #1050)
- `filter`, `reject`, `some`, `every`, and related functions now expect an error as the first callback argument, rather than just a simple boolean. Pass `null` as the first argument, or use `fs.access` instead of `fs.exists`. (#118, #774, #1028, #1041)
- `{METHOD}` and `{METHOD}Series` are now implemented in terms of `{METHOD}Limit`. This is a major internal simplification, and is not expected to cause many problems, but it does subtly affect how functions execute internally. (#778, #847)
- `retry`'s callback is now optional. Previously, omitting the callback would partially apply the function, meaning it could be passed directly as a task to `series` or `auto`.
## Other
- Added `someSeries` and `everySeries` for symmetry, as well as a complete set of `any`/`anyLimit`/`anySeries` and `all`/`/allLmit`/`allSeries` aliases.
- Added `find` as an alias for `detect` (as well as `findLimit` and `findSeries`).
- Various doc fixes (#1005, #1008, #1010, #1015, #1021, #1037)
------------------------------------------
# v1.5.2
- Allow using `"consructor"` as an argument in `memoize` (#998)
- Allow using `"constructor"` as an argument in `memoize` (#998)
- Give a better error messsage when `auto` dependency checking fails (#994)

@@ -83,3 +133,3 @@ - Various doc updates (#936, #956, #979, #1002)

- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782)
- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782)

@@ -96,3 +146,3 @@

- The callback is now optional for the composed results of `compose` and `seq`. (#618)
- Reduced file size by 4kb, (minified version by 1kb)
- Reduced file size by 4kb, (minified version by 1kb)
- Added code coverage through `nyc` and `coveralls` (#768)

@@ -99,0 +149,0 @@

2

dist/async.min.js

@@ -1,2 +0,2 @@

!function(){function n(){}function t(n){return n}function e(n){return!!n}function r(n){return!n}function u(n){return function(){if(null===n)throw new Error("Callback was already called.");n.apply(this,arguments),n=null}}function i(n){return function(){null!==n&&(n.apply(this,arguments),n=null)}}function o(n){return M(n)||"number"==typeof n.length&&n.length>=0&&n.length%1===0}function c(n,t){for(var e=-1,r=n.length;++e<r;)t(n[e],e,n)}function a(n,t){for(var e=-1,r=n.length,u=Array(r);++e<r;)u[e]=t(n[e],e,n);return u}function f(n){return a(Array(n),function(n,t){return t})}function l(n,t,e){return c(n,function(n,r,u){e=t(e,n,r,u)}),e}function s(n,t){c(W(n),function(e){t(n[e],e)})}function p(n,t){for(var e=0;e<n.length;e++)if(n[e]===t)return e;return-1}function h(n){var t,e,r=-1;return o(n)?(t=n.length,function(){return r++,t>r?r:null}):(e=W(n),t=e.length,function(){return r++,t>r?e[r]:null})}function m(n,t){return t=null==t?n.length-1:+t,function(){for(var e=Math.max(arguments.length-t,0),r=Array(e),u=0;e>u;u++)r[u]=arguments[u+t];switch(t){case 0:return n.call(this,r);case 1:return n.call(this,arguments[0],r)}}}function y(n){return function(t,e,r){return n(t,r)}}function v(t){return function(e,r,o){o=i(o||n),e=e||[];var c=h(e);if(0>=t)return o(null);var a=!1,f=0,l=!1;!function s(){if(a&&0>=f)return o(null);for(;t>f&&!l;){var n=c();if(null===n)return a=!0,void(0>=f&&o(null));f+=1,r(e[n],n,u(function(n){f-=1,n?(o(n),l=!0):s()}))}}()}}function d(n){return function(t,e,r){return n(P.eachOf,t,e,r)}}function g(n){return function(t,e,r,u){return n(v(e),t,r,u)}}function k(n){return function(t,e,r){return n(P.eachOfSeries,t,e,r)}}function b(t,e,r,u){u=i(u||n),e=e||[];var c=o(e)?[]:{};t(e,function(n,t,e){r(n,function(n,r){c[t]=r,e(n)})},function(n){u(n,c)})}function w(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(e){e&&u.push({index:t,value:n}),r()})},function(){r(a(u.sort(function(n,t){return n.index-t.index}),function(n){return n.value}))})}function O(n,t,e,r){w(n,t,function(n,t){e(n,function(n){t(!n)})},r)}function S(n,t,e){return function(r,u,i,o){function c(){o&&o(e(!1,void 0))}function a(n,r,u){return o?void i(n,function(r){o&&t(r)&&(o(e(!0,n)),o=i=!1),u()}):u()}arguments.length>3?n(r,u,a,c):(o=i,i=u,n(r,a,c))}}function E(n,t){return t}function L(t,e,r){r=r||n;var u=o(e)?[]:{};t(e,function(n,t,e){n(m(function(n,r){r.length<=1&&(r=r[0]),u[t]=r,e(n)}))},function(n){r(n,u)})}function j(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(n,t){u=u.concat(t||[]),r(n)})},function(n){r(n,u)})}function I(t,e,r){function i(t,e,r,u){if(null!=u&&"function"!=typeof u)throw new Error("task callback must be a function");return t.started=!0,M(e)||(e=[e]),0===e.length&&t.idle()?P.setImmediate(function(){t.drain()}):(c(e,function(e){var i={data:e,callback:u||n};r?t.tasks.unshift(i):t.tasks.push(i),t.tasks.length===t.concurrency&&t.saturated()}),void P.setImmediate(t.process))}function o(n,t){return function(){f-=1;var e=!1,r=arguments;c(t,function(n){c(l,function(t,r){t!==n||e||(l.splice(r,1),e=!0)}),n.callback.apply(n,r)}),n.tasks.length+f===0&&n.drain(),n.process()}}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var f=0,l=[],s={tasks:[],concurrency:e,payload:r,saturated:n,empty:n,drain:n,started:!1,paused:!1,push:function(n,t){i(s,n,!1,t)},kill:function(){s.drain=n,s.tasks=[]},unshift:function(n,t){i(s,n,!0,t)},process:function(){for(;!s.paused&&f<s.concurrency&&s.tasks.length;){var n=s.payload?s.tasks.splice(0,s.payload):s.tasks.splice(0,s.tasks.length),e=a(n,function(n){return n.data});0===s.tasks.length&&s.empty(),f+=1,l.push(n[0]);var r=u(o(s,n));t(e,r)}},length:function(){return s.tasks.length},running:function(){return f},workersList:function(){return l},idle:function(){return s.tasks.length+f===0},pause:function(){s.paused=!0},resume:function(){if(s.paused!==!1){s.paused=!1;for(var n=Math.min(s.concurrency,s.tasks.length),t=1;n>=t;t++)P.setImmediate(s.process)}}};return s}function x(n){return m(function(t,e){t.apply(null,e.concat([m(function(t,e){"object"==typeof console&&(t?console.error&&console.error(t):console[n]&&c(e,function(t){console[n](t)}))})]))})}function A(n){return function(t,e,r){n(f(t),e,r)}}function T(n){return m(function(t,e){var r=m(function(e){var r=this,u=e.pop();return n(t,function(n,t,u){n.apply(r,e.concat([u]))},u)});return e.length?r.apply(this,e):r})}function z(n){return m(function(t){var e=t.pop();t.push(function(){var n=arguments;r?P.setImmediate(function(){e.apply(null,n)}):e.apply(null,n)});var r=!0;n.apply(this,t),r=!1})}var q,P={},C="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this;null!=C&&(q=C.async),P.noConflict=function(){return C.async=q,P};var H=Object.prototype.toString,M=Array.isArray||function(n){return"[object Array]"===H.call(n)},U=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},W=Object.keys||function(n){var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push(e);return t},B="function"==typeof setImmediate&&setImmediate,D=B?function(n){B(n)}:function(n){setTimeout(n,0)};"object"==typeof process&&"function"==typeof process.nextTick?P.nextTick=process.nextTick:P.nextTick=D,P.setImmediate=B?D:P.nextTick,P.forEach=P.each=function(n,t,e){return P.eachOf(n,y(t),e)},P.forEachSeries=P.eachSeries=function(n,t,e){return P.eachOfSeries(n,y(t),e)},P.forEachLimit=P.eachLimit=function(n,t,e,r){return v(t)(n,y(e),r)},P.forEachOf=P.eachOf=function(t,e,r){function o(n){f--,n?r(n):null===c&&0>=f&&r(null)}r=i(r||n),t=t||[];for(var c,a=h(t),f=0;null!=(c=a());)f+=1,e(t[c],c,u(o));0===f&&r(null)},P.forEachOfSeries=P.eachOfSeries=function(t,e,r){function o(){var n=!0;return null===a?r(null):(e(t[a],a,u(function(t){if(t)r(t);else{if(a=c(),null===a)return r(null);n?P.setImmediate(o):o()}})),void(n=!1))}r=i(r||n),t=t||[];var c=h(t),a=c();o()},P.forEachOfLimit=P.eachOfLimit=function(n,t,e,r){v(t)(n,e,r)},P.map=d(b),P.mapSeries=k(b),P.mapLimit=g(b),P.inject=P.foldl=P.reduce=function(n,t,e,r){P.eachOfSeries(n,function(n,r,u){e(t,n,function(n,e){t=e,u(n)})},function(n){r(n,t)})},P.foldr=P.reduceRight=function(n,e,r,u){var i=a(n,t).reverse();P.reduce(i,e,r,u)},P.transform=function(n,t,e,r){3===arguments.length&&(r=e,e=t,t=M(n)?[]:{}),P.eachOf(n,function(n,r,u){e(t,n,r,u)},function(n){r(n,t)})},P.select=P.filter=d(w),P.selectLimit=P.filterLimit=g(w),P.selectSeries=P.filterSeries=k(w),P.reject=d(O),P.rejectLimit=g(O),P.rejectSeries=k(O),P.any=P.some=S(P.eachOf,e,t),P.someLimit=S(P.eachOfLimit,e,t),P.all=P.every=S(P.eachOf,r,r),P.everyLimit=S(P.eachOfLimit,r,r),P.detect=S(P.eachOf,t,E),P.detectSeries=S(P.eachOfSeries,t,E),P.detectLimit=S(P.eachOfLimit,t,E),P.sortBy=function(n,t,e){function r(n,t){var e=n.criteria,r=t.criteria;return r>e?-1:e>r?1:0}P.map(n,function(n,e){t(n,function(t,r){t?e(t):e(null,{value:n,criteria:r})})},function(n,t){return n?e(n):void e(null,a(t.sort(r),function(n){return n.value}))})},P.auto=function(t,e,r){function u(n){g.unshift(n)}function o(n){var t=p(g,n);t>=0&&g.splice(t,1)}function a(){h--,c(g.slice(0),function(n){n()})}"function"==typeof arguments[1]&&(r=e,e=null),r=i(r||n);var f=W(t),h=f.length;if(!h)return r(null);e||(e=h);var y={},v=0,d=!1,g=[];u(function(){h||r(null,y)}),c(f,function(n){function i(){return e>v&&l(k,function(n,t){return n&&y.hasOwnProperty(t)},!0)&&!y.hasOwnProperty(n)}function c(){i()&&(v++,o(c),h[h.length-1](g,y))}if(!d){for(var f,h=M(t[n])?t[n]:[t[n]],g=m(function(t,e){if(v--,e.length<=1&&(e=e[0]),t){var u={};s(y,function(n,t){u[t]=n}),u[n]=e,d=!0,r(t,u)}else y[n]=e,P.setImmediate(a)}),k=h.slice(0,h.length-1),b=k.length;b--;){if(!(f=t[k[b]]))throw new Error("Has nonexistent dependency in "+k.join(", "));if(M(f)&&p(f,n)>=0)throw new Error("Has cyclic dependencies")}i()?(v++,h[h.length-1](g,y)):u(c)}})},P.retry=function(n,t,e){function r(n,t){if("number"==typeof t)n.times=parseInt(t,10)||i;else{if("object"!=typeof t)throw new Error("Unsupported argument type for 'times': "+typeof t);n.times=parseInt(t.times,10)||i,n.interval=parseInt(t.interval,10)||o}}function u(n,t){function e(n,e){return function(r){n(function(n,t){r(!n||e,{err:n,result:t})},t)}}function r(n){return function(t){setTimeout(function(){t(null)},n)}}for(;a.times;){var u=!(a.times-=1);c.push(e(a.task,u)),!u&&a.interval>0&&c.push(r(a.interval))}P.series(c,function(t,e){e=e[e.length-1],(n||a.callback)(e.err,e.result)})}var i=5,o=0,c=[],a={times:i,interval:o},f=arguments.length;if(1>f||f>3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");return 2>=f&&"function"==typeof n&&(e=t,t=n),"function"!=typeof n&&r(a,n),a.callback=e,a.task=t,a.callback?u():u},P.waterfall=function(t,e){function r(n){return m(function(t,u){if(t)e.apply(null,[t].concat(u));else{var i=n.next();i?u.push(r(i)):u.push(e),z(n).apply(null,u)}})}if(e=i(e||n),!M(t)){var u=new Error("First argument to waterfall must be an array of functions");return e(u)}return t.length?void r(P.iterator(t))():e()},P.parallel=function(n,t){L(P.eachOf,n,t)},P.parallelLimit=function(n,t,e){L(v(t),n,e)},P.series=function(n,t){L(P.eachOfSeries,n,t)},P.iterator=function(n){function t(e){function r(){return n.length&&n[e].apply(null,arguments),r.next()}return r.next=function(){return e<n.length-1?t(e+1):null},r}return t(0)},P.apply=m(function(n,t){return m(function(e){return n.apply(null,t.concat(e))})}),P.concat=d(j),P.concatSeries=k(j),P.whilst=function(t,e,r){if(r=r||n,t()){var u=m(function(n,i){n?r(n):t.apply(this,i)?e(u):r.apply(null,[null].concat(i))});e(u)}else r(null)},P.doWhilst=function(n,t,e){var r=0;return P.whilst(function(){return++r<=1||t.apply(this,arguments)},n,e)},P.until=function(n,t,e){return P.whilst(function(){return!n.apply(this,arguments)},t,e)},P.doUntil=function(n,t,e){return P.doWhilst(n,function(){return!t.apply(this,arguments)},e)},P.during=function(t,e,r){r=r||n;var u=m(function(n,e){n?r(n):(e.push(i),t.apply(this,e))}),i=function(n,t){n?r(n):t?e(u):r(null)};t(i)},P.doDuring=function(n,t,e){var r=0;P.during(function(n){r++<1?n(null,!0):t.apply(this,arguments)},n,e)},P.queue=function(n,t){var e=I(function(t,e){n(t[0],e)},t,1);return e},P.priorityQueue=function(t,e){function r(n,t){return n.priority-t.priority}function u(n,t,e){for(var r=-1,u=n.length-1;u>r;){var i=r+(u-r+1>>>1);e(t,n[i])>=0?r=i:u=i-1}return r}function i(t,e,i,o){if(null!=o&&"function"!=typeof o)throw new Error("task callback must be a function");return t.started=!0,M(e)||(e=[e]),0===e.length?P.setImmediate(function(){t.drain()}):void c(e,function(e){var c={data:e,priority:i,callback:"function"==typeof o?o:n};t.tasks.splice(u(t.tasks,c,r)+1,0,c),t.tasks.length===t.concurrency&&t.saturated(),P.setImmediate(t.process)})}var o=P.queue(t,e);return o.push=function(n,t,e){i(o,n,t,e)},delete o.unshift,o},P.cargo=function(n,t){return I(n,1,t)},P.log=x("log"),P.dir=x("dir"),P.memoize=function(n,e){var r={},u={},i=Object.prototype.hasOwnProperty;e=e||t;var o=m(function(t){var o=t.pop(),c=e.apply(null,t);i.call(r,c)?P.setImmediate(function(){o.apply(null,r[c])}):i.call(u,c)?u[c].push(o):(u[c]=[o],n.apply(null,t.concat([m(function(n){r[c]=n;var t=u[c];delete u[c];for(var e=0,i=t.length;i>e;e++)t[e].apply(null,n)})])))});return o.memo=r,o.unmemoized=n,o},P.unmemoize=function(n){return function(){return(n.unmemoized||n).apply(null,arguments)}},P.times=A(P.map),P.timesSeries=A(P.mapSeries),P.timesLimit=function(n,t,e,r){return P.mapLimit(f(n),t,e,r)},P.seq=function(){var t=arguments;return m(function(e){var r=this,u=e[e.length-1];"function"==typeof u?e.pop():u=n,P.reduce(t,e,function(n,t,e){t.apply(r,n.concat([m(function(n,t){e(n,t)})]))},function(n,t){u.apply(r,[n].concat(t))})})},P.compose=function(){return P.seq.apply(null,Array.prototype.reverse.call(arguments))},P.applyEach=T(P.eachOf),P.applyEachSeries=T(P.eachOfSeries),P.forever=function(t,e){function r(n){return n?i(n):void o(r)}var i=u(e||n),o=z(t);r()},P.ensureAsync=z,P.constant=m(function(n){var t=[null].concat(n);return function(n){return n.apply(this,t)}}),P.wrapSync=P.asyncify=function(n){return m(function(t){var e,r=t.pop();try{e=n.apply(this,t)}catch(u){return r(u)}U(e)&&"function"==typeof e.then?e.then(function(n){r(null,n)})["catch"](function(n){r(n.message?n:new Error(n))}):r(null,e)})},"object"==typeof module&&module.exports?module.exports=P:"function"==typeof define&&define.amd?define([],function(){return P}):C.async=P}();
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.async=t.async||{})}(this,function(t){"use strict";function n(t,n,r){var e=r.length;switch(e){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function r(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function e(t){var n=r(t)?Xn.call(t):"";return n==Jn||n==Kn}function o(t){if(r(t)){var n=e(t.valueOf)?t.valueOf():t;t=r(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Zn,"");var o=nr.test(t);return o||rr.test(t)?er(t.slice(2),o?2:8):tr.test(t)?Yn:+t}function u(t){if(!t)return 0===t?t:0;if(t=o(t),t===or||t===-or){var n=0>t?-1:1;return n*ur}var r=t%1;return t===t?r?t-r:t:0}function i(t,r){if("function"!=typeof t)throw new TypeError(ir);return r=cr(void 0===r?t.length-1:u(r),0),function(){for(var e=arguments,o=-1,u=cr(e.length-r,0),i=Array(u);++o<u;)i[o]=e[r+o];switch(r){case 0:return t.call(this,i);case 1:return t.call(this,e[0],i);case 2:return t.call(this,e[0],e[1],i)}var c=Array(r+1);for(o=-1;++o<r;)c[o]=e[o];return c[r]=i,n(t,this,c)}}function c(t){return i(function(n,r){var e=i(function(r){var e=this,o=r.pop();return t(n,function(t,n,o){t.apply(e,r.concat([o]))},o)});return r.length?e.apply(this,r):e})}function a(){}function f(t,n){var r;if("function"!=typeof n)throw new TypeError(ar);return t=u(t),function(){return--t>0&&(r=n.apply(this,arguments)),1>=t&&(n=void 0),r}}function l(t){return f(2,t)}function s(t){return function(n){return null==n?void 0:n[t]}}function p(t){return"number"==typeof t&&t>-1&&t%1==0&&lr>=t}function y(t){return null!=t&&p(fr(t))&&!e(t)}function h(t,n){return pr.call(t,n)||"object"==typeof t&&n in t&&null===yr(t)}function v(t){return hr(Object(t))}function d(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function m(t){return!!t&&"object"==typeof t}function g(t){return m(t)&&y(t)}function b(t){return g(t)&&mr.call(t,"callee")&&(!br.call(t,"callee")||gr.call(t)==vr)}function j(t){return"string"==typeof t||!jr(t)&&m(t)&&Sr.call(t)==wr}function w(t){var n=t?t.length:void 0;return p(n)&&(jr(t)||j(t)||b(t))?d(n,String):null}function O(t,n){return t="number"==typeof t||kr.test(t)?+t:-1,n=null==n?_r:n,t>-1&&t%1==0&&n>t}function S(t){var n=t&&t.constructor,r="function"==typeof n&&n.prototype||Er;return t===r}function _(t){var n=S(t);if(!n&&!y(t))return v(t);var r=w(t),e=!!r,o=r||[],u=o.length;for(var i in t)!h(t,i)||e&&("length"==i||O(i,u))||n&&"constructor"==i||o.push(i);return o}function k(t){var n,r=-1;if(y(t))return n=t.length,function(){return r++,n>r?r:null};var e=_(t);return n=e.length,function(){return r++,n>r?e[r]:null}}function E(t){return function(){if(null===t)throw new Error("Callback was already called.");t.apply(this,arguments),t=null}}function A(t){return function(n,r,e){e=l(e||a),n=n||[];var o=k(n);if(0>=t)return e(null);var u=!1,i=0,c=!1;!function f(){if(u&&0>=i)return e(null);for(;t>i&&!c;){var a=o();if(null===a)return u=!0,void(0>=i&&e(null));i+=1,r(n[a],a,E(function(t){i-=1,t?(e(t),c=!0):f()}))}}()}}function L(t,n,r,e){A(n)(t,r,e)}function x(t,n){return function(r,e,o){return t(r,n,e,o)}}function I(t){return i(function(n){var e,o=n.pop();try{e=t.apply(this,n)}catch(u){return o(u)}r(e)&&"function"==typeof e.then?e.then(function(t){o(null,t)})["catch"](function(t){o(t.message?t:new Error(t))}):o(null,e)})}function T(t,n){for(var r=-1,e=t.length;++r<e&&n(t[r],r,t)!==!1;);return t}function F(t){return t}function M(t){return"function"==typeof t?t:F}function $(t){return function(n,r,e){for(var o=-1,u=Object(n),i=e(n),c=i.length;c--;){var a=i[t?c:++o];if(r(u[a],a,u)===!1)break}return n}}function U(t,n){return t&&Fr(t,n,_)}function P(t,n){return t&&U(t,M(n))}function z(t,n,r){for(var e=t.length,o=n+(r?0:-1);r?o--:++o<e;){var u=t[o];if(u!==u)return o}return-1}function B(t,n,r){if(n!==n)return z(t,r);for(var e=r-1,o=t.length;++e<o;)if(t[e]===n)return e;return-1}function C(t,n,r){var e=t?t.length:0;return e?(r=u(r),0>r&&(r=Mr(e+r,0)),B(t,n,r)):-1}function q(t,n,r){function e(t,n){m.push(function(){f(t,n)})}function o(){if(0===m.length&&0===h)return r(null,y);for(;m.length&&n>h;){var t=m.shift();t()}}function u(t,n){var r=d[t];r||(r=d[t]=[]),r.push(n)}function c(t){var n=d[t]||[];T(n,function(t){t()}),o()}function f(t,n){if(!v){var e=E(i(function(n,e){if(h--,e.length<=1&&(e=e[0]),n){var o={};P(y,function(t,n){o[n]=t}),o[t]=e,v=!0,d=[],r(n,o)}else y[t]=e,c(t)}));h++;var o=n[n.length-1];n.length>1?o(y,e):o(e)}}"function"==typeof n&&(r=n,n=null),r=l(r||a);var s=_(t),p=s.length;if(!p)return r(null);n||(n=p);var y={},h=0,v=!1,d={},m=[];P(t,function(n,r){function o(){for(var n,e=i.length;e--;){if(!(n=t[i[e]]))throw new Error("async.auto task `"+r+"` has non-existent dependency in "+i.join(", "));if(jr(n)&&C(n,r)>=0)throw new Error("async.auto task `"+r+"`Has cyclic dependencies")}}if(!jr(n))return void e(r,[n]);var i=n.slice(0,n.length-1),c=i.length;o(),T(i,function(t){u(t,function(){c--,0===c&&e(r,n)})})}),o()}function D(t,n){for(var r=-1,e=t.length,o=Array(e);++r<e;)o[r]=n(t[r],r,t);return o}function R(){this.__data__={array:[],map:null}}function W(t,n){return t===n||t!==t&&n!==n}function N(t,n){for(var r=t.length;r--;)if(W(t[r][0],n))return r;return-1}function G(t,n){var r=N(t,n);if(0>r)return!1;var e=t.length-1;return r==e?t.pop():Ur.call(t,r,1),!0}function Q(t){var n=this.__data__,r=n.array;return r?G(r,t):n.map["delete"](t)}function H(t,n){var r=N(t,n);return 0>r?void 0:t[r][1]}function J(t){var n=this.__data__,r=n.array;return r?H(r,t):n.map.get(t)}function K(t,n){return N(t,n)>-1}function V(t){var n=this.__data__,r=n.array;return r?K(r,t):n.map.has(t)}function X(t){var n=!1;if(null!=t&&"function"!=typeof t.toString)try{n=!!(t+"")}catch(r){}return n}function Y(t){return null==t?!1:e(t)?Dr.test(Cr.call(t)):m(t)&&(X(t)?Dr:zr).test(t)}function Z(t,n){var r=t[n];return Y(r)?r:void 0}function tt(){}function nt(t){return t&&t.Object===Object?t:null}function rt(){this.__data__={hash:new tt,map:Yr?new Yr:[],string:new tt}}function et(t,n){return Rr?void 0!==t[n]:te.call(t,n)}function ot(t,n){return et(t,n)&&delete t[n]}function ut(t){var n=typeof t;return"number"==n||"boolean"==n||"string"==n&&"__proto__"!=t||null==t}function it(t){var n=this.__data__;return ut(t)?ot("string"==typeof t?n.string:n.hash,t):Yr?n.map["delete"](t):G(n.map,t)}function ct(t,n){if(Rr){var r=t[n];return r===ne?void 0:r}return ee.call(t,n)?t[n]:void 0}function at(t){var n=this.__data__;return ut(t)?ct("string"==typeof t?n.string:n.hash,t):Yr?n.map.get(t):H(n.map,t)}function ft(t){var n=this.__data__;return ut(t)?et("string"==typeof t?n.string:n.hash,t):Yr?n.map.has(t):K(n.map,t)}function lt(t,n,r){var e=N(t,n);0>e?t.push([n,r]):t[e][1]=r}function st(t,n,r){t[n]=Rr&&void 0===r?oe:r}function pt(t,n){var r=this.__data__;return ut(t)?st("string"==typeof t?r.string:r.hash,t,n):Yr?r.map.set(t,n):lt(r.map,t,n),this}function yt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function ht(t,n){var r=this.__data__,e=r.array;e&&(e.length<ue-1?lt(e,t,n):(r.array=null,r.map=new yt(e)));var o=r.map;return o&&o.set(t,n),this}function vt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function dt(t,n,r){var e=t[n];ce.call(t,n)&&W(e,r)&&(void 0!==r||n in t)||(t[n]=r)}function mt(t,n,r,e){r||(r={});for(var o=-1,u=n.length;++o<u;){var i=n[o],c=e?e(r[i],t[i],i,r,t):t[i];dt(r,i,c)}return r}function gt(t,n,r){return mt(t,n,r)}function bt(t,n){return t&&gt(n,_(n),t)}function jt(t,n){if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function wt(t,n){var r=-1,e=t.length;for(n||(n=Array(e));++r<e;)n[r]=t[r];return n}function Ot(t,n){return gt(t,fe(t),n)}function St(t){return ge.call(t)}function _t(t){var n=t.length,r=t.constructor(n);return n&&"string"==typeof t[0]&&_e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function kt(t){var n=new t.constructor(t.byteLength);return new ke(n).set(new ke(t)),n}function Et(t,n){return t.set(n[0],n[1]),t}function At(t,n,r,e){var o=-1,u=t.length;for(e&&u&&(r=t[++o]);++o<u;)r=n(r,t[o],o,t);return r}function Lt(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function xt(t){return At(Lt(t),Et,new t.constructor)}function It(t){var n=new t.constructor(t.source,Ee.exec(t));return n.lastIndex=t.lastIndex,n}function Tt(t,n){return t.add(n),t}function Ft(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r}function Mt(t){return At(Ft(t),Tt,new t.constructor)}function $t(t){return xe?Object(xe.call(t)):{}}function Ut(t,n){var r=n?kt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Pt(t,n,r){var e=t.constructor;switch(n){case Be:return kt(t);case Ie:case Te:return new e(+t);case Ce:case qe:case De:case Re:case We:case Ne:case Ge:case Qe:case He:return Ut(t,r);case Fe:return xt(t);case Me:case Pe:return new e(t);case $e:return It(t);case Ue:return Mt(t);case ze:return $t(t)}}function zt(t){return r(t)?Je(t):{}}function Bt(t){return"function"!=typeof t.constructor||S(t)?{}:zt(Ke(t))}function Ct(t){return function(){return t}}function qt(t,n,e,o,u,i,c){var a;if(o&&(a=i?o(t,u,i,c):o(t)),void 0!==a)return a;if(!r(t))return t;var f=jr(t);if(f){if(a=_t(t),!n)return wt(t,a)}else{var l=Oe(t),s=l==co||l==ao;if(no(t))return jt(t,n);if(l==so||l==ro||s&&!i){if(X(t))return i?t:{};if(a=Bt(s?{}:t),!n)return a=bt(a,t),e?Ot(t,a):a}else{if(!Lo[l])return i?t:{};a=Pt(t,l,n)}}c||(c=new vt);var p=c.get(t);return p?p:(c.set(t,a),(f?T:U)(t,function(r,u){dt(a,u,qt(r,n,e,o,u,t,c))}),e&&!f?Ot(t,a):a)}function Dt(t){return t.toString().match(Io)[1].split(/\s*\,\s*/)}function Rt(t,n){var r={};P(t,function(t,n){function e(n,r){var e=D(o,function(t){return n[t]});e.push(r),t.apply(null,e)}var o;if(jr(t))o=qt(t),t=o.pop(),r[n]=o.concat(e);else{if(0===t.length)throw new Error("autoInject task functions require explicit parameters.");1===t.length?r[n]=t:(o=Dt(t),o.pop(),r[n]=o.concat(e))}}),q(r,n)}function Wt(t,n,r){function e(t,n,r,e){if(null!=e&&"function"!=typeof e)throw new Error("task callback must be a function");return t.started=!0,jr(n)||(n=[n]),0===n.length&&t.idle()?Fo(function(){t.drain()}):(T(n,function(n){var o={data:n,callback:e||a};r?t.tasks.unshift(o):t.tasks.push(o),t.tasks.length===t.concurrency&&t.saturated(),t.tasks.length<=t.concurrency-t.buffer&&t.unsaturated()}),void Fo(t.process))}function o(t,n){return function(){u-=1;var r=!1,e=arguments;T(n,function(t){T(i,function(n,e){n!==t||r||(i.splice(e,1),r=!0)}),t.callback.apply(t,e)}),t.tasks.length+u===0&&t.drain(),t.process()}}if(null==n)n=1;else if(0===n)throw new Error("Concurrency must not be zero");var u=0,i=[],c={tasks:[],concurrency:n,payload:r,saturated:a,unsaturated:a,buffer:n/4,empty:a,drain:a,started:!1,paused:!1,push:function(t,n){e(c,t,!1,n)},kill:function(){c.drain=a,c.tasks=[]},unshift:function(t,n){e(c,t,!0,n)},process:function(){for(;!c.paused&&u<c.concurrency&&c.tasks.length;){var n=c.payload?c.tasks.splice(0,c.payload):c.tasks.splice(0,c.tasks.length),r=D(n,s("data"));0===c.tasks.length&&c.empty(),u+=1,i.push(n[0]);var e=E(o(c,n));t(r,e)}},length:function(){return c.tasks.length},running:function(){return u},workersList:function(){return i},idle:function(){return c.tasks.length+u===0},pause:function(){c.paused=!0},resume:function(){if(c.paused!==!1){c.paused=!1;for(var t=Math.min(c.concurrency,c.tasks.length),n=1;t>=n;n++)Fo(c.process)}}};return c}function Nt(t,n){return Wt(t,1,n)}function Gt(t,n,r,e){xr(t,function(t,e,o){r(n,t,function(t,r){n=r,o(t)})},function(t){e(t,n)})}function Qt(){var t=arguments;return i(function(n){var r=this,e=n[n.length-1];"function"==typeof e?n.pop():e=a,Gt(t,n,function(t,n,e){n.apply(r,t.concat([i(function(t,n){e(t,n)})]))},function(t,n){e.apply(r,[t].concat(n))})})}function Ht(){return Qt.apply(null,Mo.call(arguments))}function Jt(t,n,r,e){var o=[];t(n,function(t,n,e){r(t,function(t,n){o=o.concat(n||[]),e(t)})},function(t){e(t,o)})}function Kt(t){return function(n,r,e){return t(Ar,n,r,e)}}function Vt(t){return function(n,r,e){return t(xr,n,r,e)}}function Xt(t,n,r){return function(e,o,u,i){function c(t){i&&(t?i(t):i(null,r(!1)))}function a(t,e,o){return i?void u(t,function(e,c){i&&(e?(i(e),i=u=!1):n(c)&&(i(null,r(!0,t)),i=u=!1)),o()}):o()}arguments.length>3?t(e,o,a,c):(i=u,u=o,t(e,a,c))}}function Yt(t,n){return n}function Zt(t){return i(function(n,r){n.apply(null,r.concat([i(function(n,r){"object"==typeof console&&(n?console.error&&console.error(n):console[t]&&T(r,function(n){console[t](n)}))})]))})}function tn(t,n,r){r=r||a;var e=i(function(n,e){n?r(n):(e.push(o),t.apply(this,e))}),o=function(t,o){return t?r(t):o?void n(e):r(null)};t(o)}function nn(t,n,r){var e=0;tn(function(t){return e++<1?t(null,!0):void n.apply(this,arguments)},t,r)}function rn(t,n,r){if(r=r||a,!t())return r(null);var e=i(function(o,u){return o?r(o):t.apply(this,u)?n(e):void r.apply(null,[null].concat(u))});n(e)}function en(t,n,r){var e=0;return rn(function(){return++e<=1||n.apply(this,arguments)},t,r)}function on(t,n,r){return en(t,function(){return!n.apply(this,arguments)},r)}function un(t){return function(n,r,e){return t(n,e)}}function cn(t,n,r,e){return A(n)(t,un(r),e)}function an(t){return i(function(n){var r=n.pop(),e=!0;n.push(function(){var t=arguments;e?Fo(function(){r.apply(null,t)}):r.apply(null,t)}),t.apply(this,n),e=!1})}function fn(t){return!t}function ln(t,n,r,e){var o=[];t(n,function(t,n,e){r(t,function(r,u){r?e(r):(u&&o.push({index:n,value:t}),e())})},function(t){t?e(t):e(null,D(o.sort(function(t,n){return t.index-n.index}),s("value")))})}function sn(t){return function(n,r,e,o){return t(A(r),n,e,o)}}function pn(t,n){function r(t){return t?e(t):void o(r)}var e=E(n||a),o=an(t);r()}function yn(t){function n(r){function e(){return t.length&&t[r].apply(null,arguments),e.next()}return e.next=function(){return r<t.length-1?n(r+1):null},e}return n(0)}function hn(t,n,r,e){e=l(e||a),n=n||[];var o=y(n)?[]:{};t(n,function(t,n,e){r(t,function(t,r){o[n]=r,e(t)})},function(t){e(t,o)})}function vn(t){return"symbol"==typeof t||m(t)&&nu.call(t)==Zo}function dn(t){if("string"==typeof t)return t;if(null==t)return"";if(vn(t))return ou?ou.call(t):"";var n=t+"";return"0"==n&&1/t==-ru?"-0":n}function mn(t){var n=[];return dn(t).replace(uu,function(t,r,e,o){n.push(e?o.replace(iu,"$1"):r||t)}),n}function gn(t){return jr(t)?t:mn(t)}function bn(t,n){return"number"==typeof t?!0:!jr(t)&&(au.test(t)||!cu.test(t)||null!=n&&t in Object(n))}function jn(t){var n=t?t.length:0;return n?t[n-1]:void 0}function wn(t,n,r){var e=-1,o=t.length;0>n&&(n=-n>o?0:o+n),r=r>o?o:r,0>r&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var u=Array(o);++e<o;)u[e]=t[e+n];return u}function On(t,n){n=bn(n,t)?[n+""]:gn(n);for(var r=0,e=n.length;null!=t&&e>r;)t=t[n[r++]];return r&&r==e?t:void 0}function Sn(t,n,r){var e=null==t?void 0:On(t,n);return void 0===e?r:e}function _n(t,n){return 1==n.length?t:Sn(t,wn(n,0,-1))}function kn(t,n,r){if(null==t)return!1;var e=r(t,n);e||bn(n)||(n=gn(n),t=_n(t,n),null!=t&&(n=jn(n),e=r(t,n)));var o=t?t.length:void 0;return e||!!o&&p(o)&&O(n,o)&&(jr(t)||j(t)||b(t))}function En(t,n){return kn(t,n,h)}function An(t,n){var r=Object.create(null),e=Object.create(null);n=n||F;var o=i(function(o){var u=o.pop(),c=n.apply(null,o);En(r,c)?Fo(function(){u.apply(null,r[c])}):En(e,c)?e[c].push(u):(e[c]=[u],t.apply(null,o.concat([i(function(t){r[c]=t;var n=e[c];delete e[c];for(var o=0,u=n.length;u>o;o++)n[o].apply(null,t)})])))});return o.memo=r,o.unmemoized=t,o}function Ln(t,n,r){r=r||a;var e=y(n)?[]:{};t(n,function(t,n,r){t(i(function(t,o){o.length<=1&&(o=o[0]),e[n]=o,r(t)}))},function(t){r(t,e)})}function xn(t,n,r){return Ln(A(n),t,r)}function In(t,n){return Wt(function(n,r){t(n[0],r)},n,1)}function Tn(t,n){function r(t,n){return t.priority-n.priority}function e(t,n,r){for(var e=-1,o=t.length-1;o>e;){var u=e+(o-e+1>>>1);r(n,t[u])>=0?e=u:o=u-1}return e}function o(t,n,o,u){if(null!=u&&"function"!=typeof u)throw new Error("task callback must be a function");return t.started=!0,jr(n)||(n=[n]),0===n.length?Fo(function(){t.drain()}):void T(n,function(n){var i={data:n,priority:o,callback:"function"==typeof u?u:a};t.tasks.splice(e(t.tasks,i,r)+1,0,i),t.tasks.length===t.concurrency&&t.saturated(),t.tasks.length<=t.concurrency-t.buffer&&t.unsaturated(),Fo(t.process)})}var u=In(t,n);return u.push=function(t,n,r){o(u,t,n,r)},delete u.unshift,u}function Fn(t,n){return function(r,e){if(null==r)return r;if(!y(r))return t(r,e);for(var o=r.length,u=n?o:-1,i=Object(r);(n?u--:++u<o)&&e(i[u],u,i)!==!1;);return r}}function Mn(t,n){return"function"==typeof n&&jr(t)?T(t,n):lu(t,M(n))}function $n(t,n){return n=l(n||a),jr(t)?t.length?void Mn(t,function(t){t(n)}):n():n(new TypeError("First argument to race must be an array of functions"))}function Un(t,n,r,e){var o=su.call(t).reverse();Gt(o,n,r,e)}function Pn(t,n,r,e){ln(t,n,function(t,n){r(t,function(t,r){t?n(t):n(null,!r)})},e)}function zn(t,n){return Ln(xr,t,n)}function Bn(t,n,r){function e(t,n){if("object"==typeof n)t.times=+n.times||i,t.interval=+n.interval||c;else{if("number"!=typeof n&&"string"!=typeof n)throw new Error("Invalid arguments for async.retry");t.times=+n||i}}function o(t){return function(r){n(function(n,e){r(!n||t,{err:n,result:e})})}}function u(t){return function(n){setTimeout(function(){n(null)},t)}}var i=5,c=0,f={times:i,interval:c};if(arguments.length<3&&"function"==typeof t?(r=n||a,n=t):(e(f,t),r=r||a),"function"!=typeof n)throw new Error("Invalid arguments for async.retry");for(var l=[];f.times;){var s=!(f.times-=1);l.push(o(s)),!s&&f.interval>0&&l.push(u(f.interval))}zn(l,function(t,n){n=n[n.length-1],r(n.err,n.result)})}function Cn(t,n){return n||(n=t,t=null),i(function(r){function e(t){n.apply(null,r.concat([t]))}var o=r.pop();t?Bn(t,e,o):Bn(e,o)})}function qn(t,n,r){function e(t,n){var r=t.criteria,e=n.criteria;return e>r?-1:r>e?1:0}Xo(t,function(t,r){n(t,function(n,e){return n?r(n):void r(null,{value:t,criteria:e})})},function(t,n){return t?r(t):void r(null,D(n.sort(e),s("value")))})}function Dn(t,n){function r(){a||(i.apply(null,arguments),clearTimeout(c))}function e(){var t=new Error("Callback function timed out.");t.code="ETIMEDOUT",a=!0,i(t)}function o(t){var n=Array.prototype.slice.call(t,0);return i=n[n.length-1],n[n.length-1]=r,n}function u(){c=setTimeout(e,n),t.apply(null,o(arguments))}var i,c,a=!1;return u}function Rn(t,n,r,e){for(var o=-1,u=bu(gu((n-t)/(r||1)),0),i=Array(u);u--;)i[e?u:++o]=t,t+=r;return i}function Wn(t,n,r,e){return Vo(Rn(0,t,1),n,r,e)}function Nn(t,n,r,e){3===arguments.length&&(e=r,r=n,n=jr(t)?[]:{}),Ar(t,function(t,e,o){r(n,t,e,o)},function(t){e(t,n)})}function Gn(t){return function(){return(t.unmemoized||t).apply(null,arguments)}}function Qn(t,n,r){return rn(function(){return!t.apply(this,arguments)},n,r)}function Hn(t,n){function r(o){if(e===t.length)return n.apply(null,[null].concat(o));var u=E(i(function(t,e){return t?n.apply(null,[t].concat(e)):void r(e)}));o.push(u);var c=t[e++];c.apply(null,o)}if(n=l(n||a),!jr(t))return n(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return n();var e=0;r([])}var Jn="[object Function]",Kn="[object GeneratorFunction]",Vn=Object.prototype,Xn=Vn.toString,Yn=NaN,Zn=/^\s+|\s+$/g,tr=/^[-+]0x[0-9a-f]+$/i,nr=/^0b[01]+$/i,rr=/^0o[0-7]+$/i,er=parseInt,or=1/0,ur=1.7976931348623157e308,ir="Expected a function",cr=Math.max,ar="Expected a function",fr=s("length"),lr=9007199254740991,sr=Object.prototype,pr=sr.hasOwnProperty,yr=Object.getPrototypeOf,hr=Object.keys,vr="[object Arguments]",dr=Object.prototype,mr=dr.hasOwnProperty,gr=dr.toString,br=dr.propertyIsEnumerable,jr=Array.isArray,wr="[object String]",Or=Object.prototype,Sr=Or.toString,_r=9007199254740991,kr=/^(?:0|[1-9]\d*)$/,Er=Object.prototype,Ar=x(L,1/0),Lr=c(Ar),xr=x(L,1),Ir=c(xr),Tr=i(function(t,n){return i(function(r){return t.apply(null,n.concat(r))})}),Fr=$(),Mr=Math.max,$r=Array.prototype,Ur=$r.splice,Pr=/[\\^$.*+?()[\]{}|]/g,zr=/^\[object .+?Constructor\]$/,Br=Object.prototype,Cr=Function.prototype.toString,qr=Br.hasOwnProperty,Dr=RegExp("^"+Cr.call(qr).replace(Pr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rr=Z(Object,"create"),Wr=Object.prototype;tt.prototype=Rr?Rr(null):Wr;var Nr={"function":!0,object:!0},Gr=Nr[typeof t]&&t&&!t.nodeType?t:void 0,Qr=Nr[typeof module]&&module&&!module.nodeType?module:void 0,Hr=nt(Gr&&Qr&&"object"==typeof global&&global),Jr=nt(Nr[typeof self]&&self),Kr=nt(Nr[typeof window]&&window),Vr=nt(Nr[typeof this]&&this),Xr=Hr||Kr!==(Vr&&Vr.window)&&Kr||Jr||Vr||Function("return this")(),Yr=Z(Xr,"Map"),Zr=Object.prototype,te=Zr.hasOwnProperty,ne="__lodash_hash_undefined__",re=Object.prototype,ee=re.hasOwnProperty,oe="__lodash_hash_undefined__";yt.prototype.clear=rt,yt.prototype["delete"]=it,yt.prototype.get=at,yt.prototype.has=ft,yt.prototype.set=pt;var ue=200;vt.prototype.clear=R,vt.prototype["delete"]=Q,vt.prototype.get=J,vt.prototype.has=V,vt.prototype.set=ht;var ie=Object.prototype,ce=ie.hasOwnProperty,ae=Object.getOwnPropertySymbols,fe=ae||function(){return[]},le=Z(Xr,"Set"),se=Z(Xr,"WeakMap"),pe="[object Map]",ye="[object Object]",he="[object Set]",ve="[object WeakMap]",de=Object.prototype,me=Function.prototype.toString,ge=de.toString,be=Yr?me.call(Yr):"",je=le?me.call(le):"",we=se?me.call(se):"";(Yr&&St(new Yr)!=pe||le&&St(new le)!=he||se&&St(new se)!=ve)&&(St=function(t){var n=ge.call(t),r=n==ye?t.constructor:null,e="function"==typeof r?me.call(r):"";if(e)switch(e){case be:return pe;case je:return he;case we:return ve}return n});var Oe=St,Se=Object.prototype,_e=Se.hasOwnProperty,ke=Xr.Uint8Array,Ee=/\w*$/,Ae=Xr.Symbol,Le=Ae?Ae.prototype:void 0,xe=Le?Le.valueOf:void 0,Ie="[object Boolean]",Te="[object Date]",Fe="[object Map]",Me="[object Number]",$e="[object RegExp]",Ue="[object Set]",Pe="[object String]",ze="[object Symbol]",Be="[object ArrayBuffer]",Ce="[object Float32Array]",qe="[object Float64Array]",De="[object Int8Array]",Re="[object Int16Array]",We="[object Int32Array]",Ne="[object Uint8Array]",Ge="[object Uint8ClampedArray]",Qe="[object Uint16Array]",He="[object Uint32Array]",Je=Object.create,Ke=Object.getPrototypeOf,Ve={"function":!0,object:!0},Xe=Ve[typeof t]&&t&&!t.nodeType?t:void 0,Ye=Ve[typeof module]&&module&&!module.nodeType?module:void 0,Ze=Ye&&Ye.exports===Xe?Xe:void 0,to=Ze?Xr.Buffer:void 0,no=to?function(t){return t instanceof to}:Ct(!1),ro="[object Arguments]",eo="[object Array]",oo="[object Boolean]",uo="[object Date]",io="[object Error]",co="[object Function]",ao="[object GeneratorFunction]",fo="[object Map]",lo="[object Number]",so="[object Object]",po="[object RegExp]",yo="[object Set]",ho="[object String]",vo="[object Symbol]",mo="[object WeakMap]",go="[object ArrayBuffer]",bo="[object Float32Array]",jo="[object Float64Array]",wo="[object Int8Array]",Oo="[object Int16Array]",So="[object Int32Array]",_o="[object Uint8Array]",ko="[object Uint8ClampedArray]",Eo="[object Uint16Array]",Ao="[object Uint32Array]",Lo={};Lo[ro]=Lo[eo]=Lo[go]=Lo[oo]=Lo[uo]=Lo[bo]=Lo[jo]=Lo[wo]=Lo[Oo]=Lo[So]=Lo[fo]=Lo[lo]=Lo[so]=Lo[po]=Lo[yo]=Lo[ho]=Lo[vo]=Lo[_o]=Lo[ko]=Lo[Eo]=Lo[Ao]=!0,Lo[io]=Lo[co]=Lo[mo]=!1;var xo,Io=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,To="function"==typeof setImmediate&&setImmediate;xo=To?To:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:function(t){setTimeout(t,0)};var Fo=i(function(t,n){xo(function(){t.apply(null,n)})}),Mo=Array.prototype.reverse,$o=Kt(Jt),Uo=Vt(Jt),Po=i(function(t){var n=[null].concat(t);return function(){var t=[].slice.call(arguments).pop();return t.apply(this,n)}}),zo=Xt(Ar,F,Yt),Bo=Xt(L,F,Yt),Co=Xt(xr,F,Yt),qo=Zt("dir"),Do=x(cn,1/0),Ro=x(cn,1),Wo=Xt(L,fn,fn),No=x(Wo,1/0),Go=x(Wo,1),Qo=sn(ln),Ho=x(Qo,1/0),Jo=x(Qo,1),Ko=Zt("log"),Vo=sn(hn),Xo=x(Vo,1/0),Yo=x(Vo,1),Zo="[object Symbol]",tu=Object.prototype,nu=tu.toString,ru=1/0,eu=Ae?Ae.prototype:void 0,ou=eu?eu.toString:void 0,uu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,iu=/\\(\\)?/g,cu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,au=/^\w*$/,fu=x(xn,1/0),lu=Fn(U),su=Array.prototype.slice,pu=sn(Pn),yu=x(pu,1/0),hu=x(pu,1),vu=Xt(L,Boolean,F),du=x(vu,1/0),mu=x(vu,1),gu=Math.ceil,bu=Math.max,ju=x(Wn,1/0),wu=x(Wn,1),Ou={applyEach:Lr,applyEachSeries:Ir,apply:Tr,asyncify:I,auto:q,autoInject:Rt,cargo:Nt,compose:Ht,concat:$o,concatSeries:Uo,constant:Po,detect:zo,detectLimit:Bo,detectSeries:Co,dir:qo,doDuring:nn,doUntil:on,doWhilst:en,during:tn,each:Do,eachLimit:cn,eachOf:Ar,eachOfLimit:L,eachOfSeries:xr,eachSeries:Ro,ensureAsync:an,every:No,everyLimit:Wo,everySeries:Go,filter:Ho,filterLimit:Qo,filterSeries:Jo,forever:pn,iterator:yn,log:Ko,map:Xo,mapLimit:Vo,mapSeries:Yo,memoize:An,nextTick:Fo,parallel:fu,parallelLimit:xn,priorityQueue:Tn,queue:In,race:$n,reduce:Gt,reduceRight:Un,reject:yu,rejectLimit:pu,rejectSeries:hu,retry:Bn,retryable:Cn,seq:Qt,series:zn,setImmediate:Fo,some:du,someLimit:vu,someSeries:mu,sortBy:qn,timeout:Dn,times:ju,timesLimit:Wn,timesSeries:wu,transform:Nn,unmemoize:Gn,until:Qn,waterfall:Hn,whilst:rn,all:No,any:du,forEach:Do,forEachSeries:Ro,forEachLimit:cn,forEachOf:Ar,forEachOfSeries:xr,forEachOfLimit:L,inject:Gt,foldl:Gt,foldr:Un,select:Ho,selectLimit:Qo,selectSeries:Jo,wrapSync:I};t["default"]=Ou,t.applyEach=Lr,t.applyEachSeries=Ir,t.apply=Tr,t.asyncify=I,t.auto=q,t.autoInject=Rt,t.cargo=Nt,t.compose=Ht,t.concat=$o,t.concatSeries=Uo,t.constant=Po,t.detect=zo,t.detectLimit=Bo,t.detectSeries=Co,t.dir=qo,t.doDuring=nn,t.doUntil=on,t.doWhilst=en,t.during=tn,t.each=Do,t.eachLimit=cn,t.eachOf=Ar,t.eachOfLimit=L,t.eachOfSeries=xr,t.eachSeries=Ro,t.ensureAsync=an,t.every=No,t.everyLimit=Wo,t.everySeries=Go,t.filter=Ho,t.filterLimit=Qo,t.filterSeries=Jo,t.forever=pn,t.iterator=yn,t.log=Ko,t.map=Xo,t.mapLimit=Vo,t.mapSeries=Yo,t.memoize=An,t.nextTick=Fo,t.parallel=fu,t.parallelLimit=xn,t.priorityQueue=Tn,t.queue=In,t.race=$n,t.reduce=Gt,t.reduceRight=Un,t.reject=yu,t.rejectLimit=pu,t.rejectSeries=hu,t.retry=Bn,t.retryable=Cn,t.seq=Qt,t.series=zn,t.setImmediate=Fo,t.some=du,t.someLimit=vu,t.someSeries=mu,t.sortBy=qn,t.timeout=Dn,t.times=ju,t.timesLimit=Wn,t.timesSeries=wu,t.transform=Nn,t.unmemoize=Gn,t.until=Qn,t.waterfall=Hn,t.whilst=rn,t.all=No,t.allLimit=Wo,t.allSeries=Go,t.any=du,t.anyLimit=vu,t.anySeries=mu,t.find=zo,t.findLimit=Bo,t.findSeries=Co,t.forEach=Do,t.forEachSeries=Ro,t.forEachLimit=cn,t.forEachOf=Ar,t.forEachOfSeries=xr,t.forEachOfLimit=L,t.inject=Gt,t.foldl=Gt,t.foldr=Un,t.select=Ho,t.selectLimit=Qo,t.selectSeries=Jo,t.wrapSync=I});
//# sourceMappingURL=dist/async.min.map
{
"name": "async",
"description": "Higher-order functions and common patterns for asynchronous code",
"main": "lib/async.js",
"files": [
"lib",
"dist/async.js",
"dist/async.min.js"
],
"version": "2.0.0-alpha.0",
"main": "dist/async.js",
"author": "Caolan McMahon",
"version": "1.5.2",
"keywords": [
"async",
"callback",
"utility",
"module"
],
"repository": {

@@ -25,4 +14,18 @@ "type": "git",

},
"license": "MIT",
"keywords": [
"async",
"callback",
"module",
"utility"
],
"dependencies": {
"lodash": "^4.3.0"
},
"devDependencies": {
"babel-cli": "^6.3.17",
"babel-core": "^6.3.26",
"babel-plugin-add-module-exports": "~0.1.2",
"babel-plugin-transform-es2015-modules-commonjs": "^6.3.16",
"babel-preset-es2015": "^6.3.13",
"babelify": "^7.2.0",
"benchmark": "bestiejs/benchmark.js",

@@ -33,2 +36,4 @@ "bluebird": "^2.9.32",

"es6-promise": "^2.3.0",
"fs-extra": "^0.26.3",
"gulp": "~3.9.0",
"jscs": "^1.13.1",

@@ -41,4 +46,2 @@ "jshint": "~2.8.0",

"karma-mocha-reporter": "^1.0.2",
"lodash": "^3.9.0",
"mkdirp": "~0.5.1",
"mocha": "^2.2.5",

@@ -48,12 +51,28 @@ "native-promise-only": "^0.8.0-a",

"nyc": "^2.1.0",
"recursive-readdir": "^1.3.0",
"rimraf": "^2.5.0",
"rollup": "^0.25.0",
"rollup-plugin-npm": "~1.3.0",
"rsvp": "^3.0.18",
"semver": "^4.3.6",
"uglify-js": "~2.4.0",
"xyz": "^0.5.0",
"vinyl-buffer": "~1.0.0",
"vinyl-source-stream": "~1.1.0",
"yargs": "~3.9.1"
},
"scripts": {
"coverage": "nyc npm test && nyc report",
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls",
"lint": "jshint lib/ test/ mocha_test/ perf/memory.js perf/suites.js perf/benchmark.js support/ gulpfile.js karma.conf.js && jscs lib/ test/ mocha_test/ perf/memory.js perf/suites.js perf/benchmark.js support/ gulpfile.js karma.conf.js",
"mocha-browser-test": "karma start",
"mocha-node-test": "mocha mocha_test/ --compilers js:babel-core/register",
"mocha-test": "npm run mocha-node-test && npm run mocha-browser-test",
"nodeunit-test": "nodeunit test/test-async.js",
"test": "npm run-script lint && npm run nodeunit-test && npm run mocha-test"
},
"license": "MIT",
"jam": {
"main": "lib/async.js",
"main": "dist/async.js",
"include": [
"lib/async.js",
"dist/async.js",
"README.md",

@@ -66,17 +85,7 @@ "LICENSE"

},
"scripts": {
"mocha-node-test": "mocha mocha_test/",
"mocha-browser-test": "karma start",
"mocha-test": "npm run mocha-node-test && npm run mocha-browser-test",
"nodeunit-test": "nodeunit test/test-async.js",
"test": "npm run-script lint && npm run nodeunit-test && npm run mocha-test",
"lint": "jshint lib/*.js test/*.js perf/*.js && jscs lib/*.js test/*.js perf/*.js",
"coverage": "nyc npm test && nyc report",
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls"
},
"spm": {
"main": "lib/async.js"
"main": "dist/async.js"
},
"volo": {
"main": "lib/async.js",
"main": "dist/async.js",
"ignore": [

@@ -90,2 +99,2 @@ "**/.*",

}
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc