summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Early <alexander.early@gmail.com>2018-08-05 13:35:58 -0700
committerGitHub <noreply@github.com>2018-08-05 13:35:58 -0700
commit61268c58857205c704b28787728ed9bfe780dbd6 (patch)
tree65f2ff1d524a6e487725207f36b0199da39abe3e
parent5c174fa63b5a7197ff6abe19a97b74ed7e77646d (diff)
downloadasync-61268c58857205c704b28787728ed9bfe780dbd6.tar.gz
[wip] initial async generator support (#1560)
feat: initial async generator support
-rw-r--r--.babelrc5
-rw-r--r--.eslintrc1
-rw-r--r--Makefile14
-rw-r--r--lib/applyEach.js2
-rw-r--r--lib/applyEachSeries.js2
-rw-r--r--lib/concat.js2
-rw-r--r--lib/concatLimit.js2
-rw-r--r--lib/concatSeries.js2
-rw-r--r--lib/detect.js2
-rw-r--r--lib/detectLimit.js2
-rw-r--r--lib/detectSeries.js2
-rw-r--r--lib/each.js2
-rw-r--r--lib/eachLimit.js2
-rw-r--r--lib/eachOf.js2
-rw-r--r--lib/eachOfLimit.js2
-rw-r--r--lib/eachOfSeries.js2
-rw-r--r--lib/eachSeries.js2
-rw-r--r--lib/every.js2
-rw-r--r--lib/everyLimit.js2
-rw-r--r--lib/everySeries.js2
-rw-r--r--lib/filter.js2
-rw-r--r--lib/filterLimit.js2
-rw-r--r--lib/filterSeries.js2
-rw-r--r--lib/groupBy.js2
-rw-r--r--lib/groupByLimit.js2
-rw-r--r--lib/groupBySeries.js2
-rw-r--r--lib/internal/asyncEachOfLimit.js63
-rw-r--r--lib/internal/breakLoop.js3
-rw-r--r--lib/internal/eachOfLimit.js8
-rw-r--r--lib/internal/wrapAsync.js10
-rw-r--r--lib/map.js2
-rw-r--r--lib/mapLimit.js2
-rw-r--r--lib/mapSeries.js2
-rw-r--r--lib/parallel.js2
-rw-r--r--lib/parallelLimit.js2
-rw-r--r--lib/reduce.js2
-rw-r--r--lib/reject.js2
-rw-r--r--lib/rejectLimit.js2
-rw-r--r--lib/rejectSeries.js2
-rw-r--r--lib/series.js2
-rw-r--r--lib/some.js2
-rw-r--r--lib/someLimit.js2
-rw-r--r--lib/someSeries.js2
-rw-r--r--lib/sortBy.js2
-rw-r--r--lib/transform.js2
-rw-r--r--lib/tryEach.js2
-rw-r--r--package-lock.json1137
-rw-r--r--package.json6
-rw-r--r--support/build.test.js4
-rw-r--r--support/build/aggregate-bundle.js6
-rw-r--r--test/asyncFunctions.js21
-rw-r--r--test/es2017/asyncGenerators.js85
52 files changed, 1243 insertions, 198 deletions
diff --git a/.babelrc b/.babelrc
index 913eb6a..911ec28 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,5 +1,8 @@
{
- "plugins": ["transform-es2015-modules-commonjs"],
+ "plugins": [
+ "transform-es2015-modules-commonjs",
+ "syntax-async-generators"
+ ],
"env": {
"test": {
"plugins": ["istanbul"]
diff --git a/.eslintrc b/.eslintrc
index 3380c04..18d322a 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -5,6 +5,7 @@
"mocha": true,
"es6": true
},
+ "parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 8,
"sourceType": "module"
diff --git a/Makefile b/Makefile
index 86af46c..6cff2c3 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,6 @@ export PATH := ./node_modules/.bin/:$(PATH):./bin/
PACKAGE = asyncjs
REQUIRE_NAME = async
-UGLIFY = uglifyjs
XYZ = support/xyz.sh --repo git@github.com:caolan/async.git
BUILDDIR = build
@@ -21,7 +20,7 @@ LINT_FILES := lib/ test/ $(shell find perf/ -maxdepth 2 -type f) $(shell find su
UMD_BUNDLE := $(BUILDDIR)/dist/async.js
UMD_BUNDLE_MIN := $(BUILDDIR)/dist/async.min.js
-UMD_BUNDLE_MAP := $(BUILDDIR)/dist/async.min.map
+# UMD_BUNDLE_MAP := $(BUILDDIR)/dist/async.min.map
ALIAS_ES := $(addprefix build-es/, $(addsuffix .js, $(shell cat $(SCRIPTS)/aliases.txt | cut -d ' ' -f1)))
ALIAS_CJS := $(patsubst build-es/%, build/%, $(ALIAS_ES))
ES_MODULES := $(patsubst lib/%.js, build-es/%.js, $(JS_SRC)) $(ALIAS_ES)
@@ -81,17 +80,14 @@ $(UMD_BUNDLE): $(ES_MODULES) package.json
node $(SCRIPTS)/build/aggregate-bundle.js
# Create the minified UMD versions and copy them to dist/ for bower
-build-dist: $(DIST) $(DIST)/async.js $(DIST)/async.min.js $(DIST)/async.min.map
+build-dist: $(DIST) $(DIST)/async.js $(DIST)/async.min.js # $(DIST)/async.min.map
$(DIST):
mkdir -p $@
$(UMD_BUNDLE_MIN): $(UMD_BUNDLE)
mkdir -p "$(@D)"
- $(UGLIFY) $< --mangle --compress \
- --source-map $(UMD_BUNDLE_MAP) \
- --source-map-url async.min.map \
- -o $@
+ babel-minify $< --mangle -o $@
$(DIST)/async.js: $(UMD_BUNDLE)
cp $< $@
@@ -99,8 +95,8 @@ $(DIST)/async.js: $(UMD_BUNDLE)
$(DIST)/async.min.js: $(UMD_BUNDLE_MIN)
cp $< $@
-$(DIST)/async.min.map: $(UMD_BUNDLE_MIN)
- cp $(UMD_BUNDLE_MAP) $@
+# $(DIST)/async.min.map: $(UMD_BUNDLE_MIN)
+# cp $(UMD_BUNDLE_MAP) $@
build-es: $(ES_MODULES)
diff --git a/lib/applyEach.js b/lib/applyEach.js
index 9228d44..4546261 100644
--- a/lib/applyEach.js
+++ b/lib/applyEach.js
@@ -15,7 +15,7 @@ import map from './map';
* @memberOf module:ControlFlow
* @method
* @category Control Flow
- * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s
+ * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s
* to all call with the same arguments
* @param {...*} [args] - any number of separate arguments to pass to the
* function.
diff --git a/lib/applyEachSeries.js b/lib/applyEachSeries.js
index 392b139..6a4d62b 100644
--- a/lib/applyEachSeries.js
+++ b/lib/applyEachSeries.js
@@ -10,7 +10,7 @@ import mapSeries from './mapSeries';
* @method
* @see [async.applyEach]{@link module:ControlFlow.applyEach}
* @category Control Flow
- * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s to all
+ * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s to all
* call with the same arguments
* @param {...*} [args] - any number of separate arguments to pass to the
* function.
diff --git a/lib/concat.js b/lib/concat.js
index f9435e5..0a8251a 100644
--- a/lib/concat.js
+++ b/lib/concat.js
@@ -12,7 +12,7 @@ import concatLimit from './concatLimit';
* @memberOf module:Collections
* @method
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
* which should use an array as its result. Invoked with (item, callback).
* @param {Function} [callback(err)] - A callback which is called after all the
diff --git a/lib/concatLimit.js b/lib/concatLimit.js
index 39d0dd7..5dbbe8d 100644
--- a/lib/concatLimit.js
+++ b/lib/concatLimit.js
@@ -11,7 +11,7 @@ import mapLimit from './mapLimit';
* @method
* @see [async.concat]{@link module:Collections.concat}
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
* which should use an array as its result. Invoked with (item, callback).
diff --git a/lib/concatSeries.js b/lib/concatSeries.js
index 26f5268..ae1bd67 100644
--- a/lib/concatSeries.js
+++ b/lib/concatSeries.js
@@ -10,7 +10,7 @@ import concatLimit from './concatLimit';
* @method
* @see [async.concat]{@link module:Collections.concat}
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - A function to apply to each item in `coll`.
* The iteratee should complete with an array an array of results.
* Invoked with (item, callback).
diff --git a/lib/detect.js b/lib/detect.js
index 1ea4eb4..3e28f0e 100644
--- a/lib/detect.js
+++ b/lib/detect.js
@@ -17,7 +17,7 @@ import doParallel from './internal/doParallel';
* @method
* @alias find
* @category Collections
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
* The iteratee must complete with a boolean value as its result.
* Invoked with (item, callback).
diff --git a/lib/detectLimit.js b/lib/detectLimit.js
index e9ff158..a0f9d89 100644
--- a/lib/detectLimit.js
+++ b/lib/detectLimit.js
@@ -12,7 +12,7 @@ import doParallelLimit from './internal/doParallelLimit';
* @see [async.detect]{@link module:Collections.detect}
* @alias findLimit
* @category Collections
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
* The iteratee must complete with a boolean value as its result.
diff --git a/lib/detectSeries.js b/lib/detectSeries.js
index 684bdaa..f563eae 100644
--- a/lib/detectSeries.js
+++ b/lib/detectSeries.js
@@ -11,7 +11,7 @@ import doLimit from './internal/doLimit';
* @see [async.detect]{@link module:Collections.detect}
* @alias findSeries
* @category Collections
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
* The iteratee must complete with a boolean value as its result.
* Invoked with (item, callback).
diff --git a/lib/each.js b/lib/each.js
index 29f2baf..dc856ac 100644
--- a/lib/each.js
+++ b/lib/each.js
@@ -18,7 +18,7 @@ import wrapAsync from './internal/wrapAsync'
* @method
* @alias forEach
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async function to apply to
* each item in `coll`. Invoked with (item, callback).
* The array index is not passed to the iteratee.
diff --git a/lib/eachLimit.js b/lib/eachLimit.js
index 462e329..e4d67cb 100644
--- a/lib/eachLimit.js
+++ b/lib/eachLimit.js
@@ -12,7 +12,7 @@ import wrapAsync from './internal/wrapAsync';
* @see [async.each]{@link module:Collections.each}
* @alias forEachLimit
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
diff --git a/lib/eachOf.js b/lib/eachOf.js
index 7d9ebd0..070204b 100644
--- a/lib/eachOf.js
+++ b/lib/eachOf.js
@@ -49,7 +49,7 @@ var eachOfGeneric = doLimit(eachOfLimit, Infinity);
* @alias forEachOf
* @category Collection
* @see [async.each]{@link module:Collections.each}
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - A function to apply to each
* item in `coll`.
* The `key` is the item's key, or index in the case of an array.
diff --git a/lib/eachOfLimit.js b/lib/eachOfLimit.js
index 1de28ef..f439be6 100644
--- a/lib/eachOfLimit.js
+++ b/lib/eachOfLimit.js
@@ -12,7 +12,7 @@ import wrapAsync from './internal/wrapAsync';
* @see [async.eachOf]{@link module:Collections.eachOf}
* @alias forEachOfLimit
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - An async function to apply to each
* item in `coll`. The `key` is the item's key, or index in the case of an
diff --git a/lib/eachOfSeries.js b/lib/eachOfSeries.js
index fc1a097..d64e7ec 100644
--- a/lib/eachOfSeries.js
+++ b/lib/eachOfSeries.js
@@ -11,7 +11,7 @@ import doLimit from './internal/doLimit';
* @see [async.eachOf]{@link module:Collections.eachOf}
* @alias forEachOfSeries
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
* Invoked with (item, key, callback).
diff --git a/lib/eachSeries.js b/lib/eachSeries.js
index 9f8d7de..ae6f6c7 100644
--- a/lib/eachSeries.js
+++ b/lib/eachSeries.js
@@ -11,7 +11,7 @@ import doLimit from './internal/doLimit';
* @see [async.each]{@link module:Collections.each}
* @alias forEachSeries
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async function to apply to each
* item in `coll`.
* The array index is not passed to the iteratee.
diff --git a/lib/every.js b/lib/every.js
index ed00f72..be2bc4a 100644
--- a/lib/every.js
+++ b/lib/every.js
@@ -11,7 +11,7 @@ import doParallel from './internal/doParallel';
* @method
* @alias all
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async truth test to apply to each item
* in the collection in parallel.
* The iteratee must complete with a boolean result value.
diff --git a/lib/everyLimit.js b/lib/everyLimit.js
index 536229a..78ffa36 100644
--- a/lib/everyLimit.js
+++ b/lib/everyLimit.js
@@ -11,7 +11,7 @@ import doParallelLimit from './internal/doParallelLimit';
* @see [async.every]{@link module:Collections.every}
* @alias allLimit
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - An async truth test to apply to each item
* in the collection in parallel.
diff --git a/lib/everySeries.js b/lib/everySeries.js
index b67368c..c450bff 100644
--- a/lib/everySeries.js
+++ b/lib/everySeries.js
@@ -11,7 +11,7 @@ import doLimit from './internal/doLimit';
* @see [async.every]{@link module:Collections.every}
* @alias allSeries
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async truth test to apply to each item
* in the collection in series.
* The iteratee must complete with a boolean result value.
diff --git a/lib/filter.js b/lib/filter.js
index 4f0cbf1..692802b 100644
--- a/lib/filter.js
+++ b/lib/filter.js
@@ -12,7 +12,7 @@ import doParallel from './internal/doParallel';
* @method
* @alias select
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A truth test to apply to each item in `coll`.
* The `iteratee` is passed a `callback(err, truthValue)`, which must be called
* with a boolean argument once it has completed. Invoked with (item, callback).
diff --git a/lib/filterLimit.js b/lib/filterLimit.js
index 2c05364..946002d 100644
--- a/lib/filterLimit.js
+++ b/lib/filterLimit.js
@@ -12,7 +12,7 @@ import doParallelLimit from './internal/doParallelLimit';
* @see [async.filter]{@link module:Collections.filter}
* @alias selectLimit
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {Function} iteratee - A truth test to apply to each item in `coll`.
* The `iteratee` is passed a `callback(err, truthValue)`, which must be called
diff --git a/lib/filterSeries.js b/lib/filterSeries.js
index c973c14..908afbc 100644
--- a/lib/filterSeries.js
+++ b/lib/filterSeries.js
@@ -11,7 +11,7 @@ import doLimit from './internal/doLimit';
* @see [async.filter]{@link module:Collections.filter}
* @alias selectSeries
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A truth test to apply to each item in `coll`.
* The `iteratee` is passed a `callback(err, truthValue)`, which must be called
* with a boolean argument once it has completed. Invoked with (item, callback).
diff --git a/lib/groupBy.js b/lib/groupBy.js
index a2f923f..860a01f 100644
--- a/lib/groupBy.js
+++ b/lib/groupBy.js
@@ -17,7 +17,7 @@ import groupByLimit from './groupByLimit';
* @memberOf module:Collections
* @method
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
* The iteratee should complete with a `key` to group the value under.
diff --git a/lib/groupByLimit.js b/lib/groupByLimit.js
index 816bcc6..f0402aa 100644
--- a/lib/groupByLimit.js
+++ b/lib/groupByLimit.js
@@ -10,7 +10,7 @@ import wrapAsync from './internal/wrapAsync';
* @method
* @see [async.groupBy]{@link module:Collections.groupBy}
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
diff --git a/lib/groupBySeries.js b/lib/groupBySeries.js
index 91935c3..a093d7f 100644
--- a/lib/groupBySeries.js
+++ b/lib/groupBySeries.js
@@ -10,7 +10,7 @@ import groupByLimit from './groupByLimit';
* @method
* @see [async.groupBy]{@link module:Collections.groupBy}
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
diff --git a/lib/internal/asyncEachOfLimit.js b/lib/internal/asyncEachOfLimit.js
new file mode 100644
index 0000000..69d5e74
--- /dev/null
+++ b/lib/internal/asyncEachOfLimit.js
@@ -0,0 +1,63 @@
+import breakLoop from './breakLoop';
+
+// for async generators
+export default function asyncEachOfLimit(generator, limit, iteratee, callback) {
+ let done = false
+ let canceled = false
+ let awaiting = false
+ let running = 0
+ let idx = 0
+
+ function replenish() {
+ //console.log('replenish')
+ if (running >= limit || awaiting || done) return
+ //console.log('replenish awaiting')
+ awaiting = true
+ generator.next().then(({value, done: iterDone}) => {
+ //console.log('got value', value)
+ if (canceled || done) return
+ awaiting = false
+ if (iterDone) {
+ done = true;
+ if (running <= 0) {
+ //console.log('done nextCb')
+ callback(null)
+ }
+ return;
+ }
+ running++
+ iteratee(value, idx, iterateeCallback)
+ idx++
+ replenish()
+ }).catch(handleError)
+ }
+
+ function iterateeCallback(err, result) {
+ //console.log('iterateeCallback')
+ running -= 1;
+ if (canceled) return
+ if (err) return handleError(err)
+
+ if (err === false) {
+ done = true;
+ canceled = true;
+ return
+ }
+
+ if (result === breakLoop || (done && running <= 0)) {
+ done = true;
+ //console.log('done iterCb')
+ return callback(null);
+ }
+ replenish()
+ }
+
+ function handleError(err) {
+ if (canceled) return
+ awaiting = false
+ done = true
+ callback(err)
+ }
+
+ replenish()
+}
diff --git a/lib/internal/breakLoop.js b/lib/internal/breakLoop.js
index 6bb216e..542b1bc 100644
--- a/lib/internal/breakLoop.js
+++ b/lib/internal/breakLoop.js
@@ -1,3 +1,4 @@
// A temporary value used to identify if the loop should be broken.
// See #1064, #1293
-export default {}; \ No newline at end of file
+const breakLoop = {};
+export default breakLoop;
diff --git a/lib/internal/eachOfLimit.js b/lib/internal/eachOfLimit.js
index 1d710dc..999cbfa 100644
--- a/lib/internal/eachOfLimit.js
+++ b/lib/internal/eachOfLimit.js
@@ -3,6 +3,8 @@ import once from './once';
import iterator from './iterator';
import onlyOnce from './onlyOnce';
+import {isAsyncGenerator, isAsyncIterable} from './wrapAsync'
+import asyncEachOfLimit from './asyncEachOfLimit'
import breakLoop from './breakLoop';
@@ -15,6 +17,12 @@ export default (limit) => {
if (!obj) {
return callback(null);
}
+ if (isAsyncGenerator(obj)) {
+ return asyncEachOfLimit(obj, limit, iteratee, callback)
+ }
+ if (isAsyncIterable(obj)) {
+ return asyncEachOfLimit(obj[Symbol.asyncIterator](), limit, iteratee, callback)
+ }
var nextElem = iterator(obj);
var done = false;
var canceled = false;
diff --git a/lib/internal/wrapAsync.js b/lib/internal/wrapAsync.js
index 2b1490c..5c3edd9 100644
--- a/lib/internal/wrapAsync.js
+++ b/lib/internal/wrapAsync.js
@@ -4,10 +4,18 @@ function isAsync(fn) {
return fn[Symbol.toStringTag] === 'AsyncFunction';
}
+function isAsyncGenerator(fn) {
+ return fn[Symbol.toStringTag] === 'AsyncGenerator';
+}
+
+function isAsyncIterable(obj) {
+ return typeof obj[Symbol.asyncIterator] === 'function';
+}
+
function wrapAsync(asyncFn) {
return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn;
}
export default wrapAsync;
-export { isAsync };
+export { isAsync, isAsyncGenerator, isAsyncIterable };
diff --git a/lib/map.js b/lib/map.js
index 100ab7a..2512c32 100644
--- a/lib/map.js
+++ b/lib/map.js
@@ -23,7 +23,7 @@ import map from './internal/map';
* @memberOf module:Collections
* @method
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
* The iteratee should complete with the transformed item.
diff --git a/lib/mapLimit.js b/lib/mapLimit.js
index 0a2fc02..905edc6 100644
--- a/lib/mapLimit.js
+++ b/lib/mapLimit.js
@@ -10,7 +10,7 @@ import map from './internal/map';
* @method
* @see [async.map]{@link module:Collections.map}
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
diff --git a/lib/mapSeries.js b/lib/mapSeries.js
index 596c75e..96b5f0a 100644
--- a/lib/mapSeries.js
+++ b/lib/mapSeries.js
@@ -10,7 +10,7 @@ import doLimit from './internal/doLimit';
* @method
* @see [async.map]{@link module:Collections.map}
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
* The iteratee should complete with the transformed item.
diff --git a/lib/parallel.js b/lib/parallel.js
index 8b6c2ce..edf8be4 100644
--- a/lib/parallel.js
+++ b/lib/parallel.js
@@ -27,7 +27,7 @@ import parallel from './internal/parallel';
* @memberOf module:ControlFlow
* @method
* @category Control Flow
- * @param {Array|Iterable|Object} tasks - A collection of
+ * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection of
* [async functions]{@link AsyncFunction} to run.
* Each async function can complete with any number of optional `result` values.
* @param {Function} [callback] - An optional callback to run once all the
diff --git a/lib/parallelLimit.js b/lib/parallelLimit.js
index 14e9e52..9a857b8 100644
--- a/lib/parallelLimit.js
+++ b/lib/parallelLimit.js
@@ -11,7 +11,7 @@ import parallel from './internal/parallel';
* @method
* @see [async.parallel]{@link module:ControlFlow.parallel}
* @category Control Flow
- * @param {Array|Iterable|Object} tasks - A collection of
+ * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection of
* [async functions]{@link AsyncFunction} to run.
* Each async function can complete with any number of optional `result` values.
* @param {number} limit - The maximum number of async operations at a time.
diff --git a/lib/reduce.js b/lib/reduce.js
index 7966e49..1a6c036 100644
--- a/lib/reduce.js
+++ b/lib/reduce.js
@@ -21,7 +21,7 @@ import wrapAsync from './internal/wrapAsync';
* @alias inject
* @alias foldl
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {*} memo - The initial state of the reduction.
* @param {AsyncFunction} iteratee - A function applied to each item in the
* array to produce the next step in the reduction.
diff --git a/lib/reject.js b/lib/reject.js
index 95a6270..cfac12d 100644
--- a/lib/reject.js
+++ b/lib/reject.js
@@ -10,7 +10,7 @@ import doParallel from './internal/doParallel';
* @method
* @see [async.filter]{@link module:Collections.filter}
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - An async truth test to apply to each item in
* `coll`.
* The should complete with a boolean value as its `result`.
diff --git a/lib/rejectLimit.js b/lib/rejectLimit.js
index 8147811..76e6ffc 100644
--- a/lib/rejectLimit.js
+++ b/lib/rejectLimit.js
@@ -11,7 +11,7 @@ import doParallelLimit from './internal/doParallelLimit';
* @method
* @see [async.reject]{@link module:Collections.reject}
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {Function} iteratee - An async truth test to apply to each item in
* `coll`.
diff --git a/lib/rejectSeries.js b/lib/rejectSeries.js
index 7eba2f7..3f2d62f 100644
--- a/lib/rejectSeries.js
+++ b/lib/rejectSeries.js
@@ -10,7 +10,7 @@ import doLimit from './internal/doLimit';
* @method
* @see [async.reject]{@link module:Collections.reject}
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - An async truth test to apply to each item in
* `coll`.
* The should complete with a boolean value as its `result`.
diff --git a/lib/series.js b/lib/series.js
index eef1534..539a1e7 100644
--- a/lib/series.js
+++ b/lib/series.js
@@ -27,7 +27,7 @@ import eachOfSeries from './eachOfSeries';
* @memberOf module:ControlFlow
* @method
* @category Control Flow
- * @param {Array|Iterable|Object} tasks - A collection containing
+ * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing
* [async functions]{@link AsyncFunction} to run in series.
* Each function can complete with any number of optional `result` values.
* @param {Function} [callback] - An optional callback to run once all the
diff --git a/lib/some.js b/lib/some.js
index d0d9d9e..65543bb 100644
--- a/lib/some.js
+++ b/lib/some.js
@@ -12,7 +12,7 @@ import doParallel from './internal/doParallel';
* @method
* @alias any
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async truth test to apply to each item
* in the collections in parallel.
* The iteratee should complete with a boolean `result` value.
diff --git a/lib/someLimit.js b/lib/someLimit.js
index a5906aa..fb6841c 100644
--- a/lib/someLimit.js
+++ b/lib/someLimit.js
@@ -11,7 +11,7 @@ import doParallelLimit from './internal/doParallelLimit';
* @see [async.some]{@link module:Collections.some}
* @alias anyLimit
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - An async truth test to apply to each item
* in the collections in parallel.
diff --git a/lib/someSeries.js b/lib/someSeries.js
index 8e278de..c05ca1f 100644
--- a/lib/someSeries.js
+++ b/lib/someSeries.js
@@ -11,7 +11,7 @@ import doLimit from './internal/doLimit';
* @see [async.some]{@link module:Collections.some}
* @alias anySeries
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async truth test to apply to each item
* in the collections in series.
* The iteratee should complete with a boolean `result` value.
diff --git a/lib/sortBy.js b/lib/sortBy.js
index 4316665..ba2a804 100644
--- a/lib/sortBy.js
+++ b/lib/sortBy.js
@@ -10,7 +10,7 @@ import wrapAsync from './internal/wrapAsync';
* @memberOf module:Collections
* @method
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
* The iteratee should complete with a value to use as the sort criteria as
diff --git a/lib/transform.js b/lib/transform.js
index 014a494..821a0fa 100644
--- a/lib/transform.js
+++ b/lib/transform.js
@@ -13,7 +13,7 @@ import wrapAsync from './internal/wrapAsync';
* @memberOf module:Collections
* @method
* @category Collection
- * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {*} [accumulator] - The initial state of the transform. If omitted,
* it will default to an empty Object or Array, depending on the type of `coll`
* @param {AsyncFunction} iteratee - A function applied to each item in the
diff --git a/lib/tryEach.js b/lib/tryEach.js
index 1b40531..af885dc 100644
--- a/lib/tryEach.js
+++ b/lib/tryEach.js
@@ -13,7 +13,7 @@ import wrapAsync from './internal/wrapAsync';
* @memberOf module:ControlFlow
* @method
* @category Control Flow
- * @param {Array|Iterable|Object} tasks - A collection containing functions to
+ * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing functions to
* run, each function is passed a `callback(err, result)` it must call on
* completion with an error `err` (which can be `null`) and an optional `result`
* value.
diff --git a/package-lock.json b/package-lock.json
index 28904fa..f42b9b4 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4,6 +4,556 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+ "@babel/code-frame": {
+ "version": "7.0.0-beta.44",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz",
+ "integrity": "sha512-cuAuTTIQ9RqcFRJ/Y8PvTh+paepNcaGxwQwjIDRWPXmzzyAeCO4KqS9ikMvq0MCbRk6GlYKwfzStrcP3/jSL8g==",
+ "dev": true,
+ "requires": {
+ "@babel/highlight": "7.0.0-beta.44"
+ }
+ },
+ "@babel/core": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.0.0-beta.55.tgz",
+ "integrity": "sha1-nhfDS1rIVeQnyY9XCRWhf8xrq0o=",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "7.0.0-beta.55",
+ "@babel/generator": "7.0.0-beta.55",
+ "@babel/helpers": "7.0.0-beta.55",
+ "@babel/parser": "7.0.0-beta.55",
+ "@babel/template": "7.0.0-beta.55",
+ "@babel/traverse": "7.0.0-beta.55",
+ "@babel/types": "7.0.0-beta.55",
+ "convert-source-map": "^1.1.0",
+ "debug": "^3.1.0",
+ "json5": "^0.5.0",
+ "lodash": "^4.17.10",
+ "resolve": "^1.3.2",
+ "semver": "^5.4.1",
+ "source-map": "^0.5.0"
+ },
+ "dependencies": {
+ "@babel/code-frame": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.55.tgz",
+ "integrity": "sha1-cfUw57AQr163p993UveJId1X6e4=",
+ "dev": true,
+ "requires": {
+ "@babel/highlight": "7.0.0-beta.55"
+ }
+ },
+ "@babel/generator": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.55.tgz",
+ "integrity": "sha1-jsERUtzDmLrjXdGBEicEQVw4OgE=",
+ "dev": true,
+ "requires": {
+ "@babel/types": "7.0.0-beta.55",
+ "jsesc": "^2.5.1",
+ "lodash": "^4.17.10",
+ "source-map": "^0.5.0",
+ "trim-right": "^1.0.1"
+ }
+ },
+ "@babel/helper-function-name": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.55.tgz",
+ "integrity": "sha1-FqqyE4Ci6rzuMyjSG5WGujQn2+8=",
+ "dev": true,
+ "requires": {
+ "@babel/helper-get-function-arity": "7.0.0-beta.55",
+ "@babel/template": "7.0.0-beta.55",
+ "@babel/types": "7.0.0-beta.55"
+ }
+ },
+ "@babel/helper-get-function-arity": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.55.tgz",
+ "integrity": "sha1-hVne2W7NO2JvnB9XSU7cT6PMapQ=",
+ "dev": true,
+ "requires": {
+ "@babel/types": "7.0.0-beta.55"
+ }
+ },
+ "@babel/helper-split-export-declaration": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.55.tgz",
+ "integrity": "sha1-7LgHS/LSLGUYolIoJTXe8TeocE8=",
+ "dev": true,
+ "requires": {
+ "@babel/types": "7.0.0-beta.55"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.55.tgz",
+ "integrity": "sha1-mIZTZH1inCYdrhVudNXwJSulIMA=",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.0.0",
+ "esutils": "^2.0.2",
+ "js-tokens": "^3.0.0"
+ }
+ },
+ "@babel/template": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.55.tgz",
+ "integrity": "sha1-xsqw4nIrpeM/4DQHO20xZzq6Mm4=",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "7.0.0-beta.55",
+ "@babel/parser": "7.0.0-beta.55",
+ "@babel/types": "7.0.0-beta.55",
+ "lodash": "^4.17.10"
+ }
+ },
+ "@babel/traverse": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.55.tgz",
+ "integrity": "sha1-UL5dD8xcxKwCCnsMUZvo2uNF1L4=",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "7.0.0-beta.55",
+ "@babel/generator": "7.0.0-beta.55",
+ "@babel/helper-function-name": "7.0.0-beta.55",
+ "@babel/helper-split-export-declaration": "7.0.0-beta.55",
+ "@babel/parser": "7.0.0-beta.55",
+ "@babel/types": "7.0.0-beta.55",
+ "debug": "^3.1.0",
+ "globals": "^11.1.0",
+ "lodash": "^4.17.10"
+ }
+ },
+ "@babel/types": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.55.tgz",
+ "integrity": "sha1-d1XJ0uWDFaZPBdjPMyI3m+FtkZk=",
+ "dev": true,
+ "requires": {
+ "esutils": "^2.0.2",
+ "lodash": "^4.17.10",
+ "to-fast-properties": "^2.0.0"
+ }
+ },
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
+ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "debug": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+ "dev": true,
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "globals": {
+ "version": "11.7.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz",
+ "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "jsesc": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz",
+ "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.4.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz",
+ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "@babel/generator": {
+ "version": "7.0.0-beta.44",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.44.tgz",
+ "integrity": "sha512-5xVb7hlhjGcdkKpMXgicAVgx8syK5VJz193k0i/0sLP6DzE6lRrU1K3B/rFefgdo9LPGMAOOOAWW4jycj07ShQ==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "7.0.0-beta.44",
+ "jsesc": "^2.5.1",
+ "lodash": "^4.2.0",
+ "source-map": "^0.5.0",
+ "trim-right": "^1.0.1"
+ },
+ "dependencies": {
+ "jsesc": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz",
+ "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=",
+ "dev": true
+ }
+ }
+ },
+ "@babel/helper-function-name": {
+ "version": "7.0.0-beta.44",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.44.tgz",
+ "integrity": "sha512-MHRG2qZMKMFaBavX0LWpfZ2e+hLloT++N7rfM3DYOMUOGCD8cVjqZpwiL8a0bOX3IYcQev1ruciT0gdFFRTxzg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-get-function-arity": "7.0.0-beta.44",
+ "@babel/template": "7.0.0-beta.44",
+ "@babel/types": "7.0.0-beta.44"
+ }
+ },
+ "@babel/helper-get-function-arity": {
+ "version": "7.0.0-beta.44",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.44.tgz",
+ "integrity": "sha512-w0YjWVwrM2HwP6/H3sEgrSQdkCaxppqFeJtAnB23pRiJB5E/O9Yp7JAAeWBl+gGEgmBFinnTyOv2RN7rcSmMiw==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "7.0.0-beta.44"
+ }
+ },
+ "@babel/helper-split-export-declaration": {
+ "version": "7.0.0-beta.44",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.44.tgz",
+ "integrity": "sha512-aQ7QowtkgKKzPGf0j6u77kBMdUFVBKNHw2p/3HX/POt5/oz8ec5cs0GwlgM8Hz7ui5EwJnzyfRmkNF1Nx1N7aA==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "7.0.0-beta.44"
+ }
+ },
+ "@babel/helpers": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.0.0-beta.55.tgz",
+ "integrity": "sha1-0LS5oyfbpC1YiQAR3rkFyCBzlhc=",
+ "dev": true,
+ "requires": {
+ "@babel/template": "7.0.0-beta.55",
+ "@babel/traverse": "7.0.0-beta.55",
+ "@babel/types": "7.0.0-beta.55"
+ },
+ "dependencies": {
+ "@babel/code-frame": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.55.tgz",
+ "integrity": "sha1-cfUw57AQr163p993UveJId1X6e4=",
+ "dev": true,
+ "requires": {
+ "@babel/highlight": "7.0.0-beta.55"
+ }
+ },
+ "@babel/generator": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.55.tgz",
+ "integrity": "sha1-jsERUtzDmLrjXdGBEicEQVw4OgE=",
+ "dev": true,
+ "requires": {
+ "@babel/types": "7.0.0-beta.55",
+ "jsesc": "^2.5.1",
+ "lodash": "^4.17.10",
+ "source-map": "^0.5.0",
+ "trim-right": "^1.0.1"
+ }
+ },
+ "@babel/helper-function-name": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.55.tgz",
+ "integrity": "sha1-FqqyE4Ci6rzuMyjSG5WGujQn2+8=",
+ "dev": true,
+ "requires": {
+ "@babel/helper-get-function-arity": "7.0.0-beta.55",
+ "@babel/template": "7.0.0-beta.55",
+ "@babel/types": "7.0.0-beta.55"
+ }
+ },
+ "@babel/helper-get-function-arity": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.55.tgz",
+ "integrity": "sha1-hVne2W7NO2JvnB9XSU7cT6PMapQ=",
+ "dev": true,
+ "requires": {
+ "@babel/types": "7.0.0-beta.55"
+ }
+ },
+ "@babel/helper-split-export-declaration": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.55.tgz",
+ "integrity": "sha1-7LgHS/LSLGUYolIoJTXe8TeocE8=",
+ "dev": true,
+ "requires": {
+ "@babel/types": "7.0.0-beta.55"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.55.tgz",
+ "integrity": "sha1-mIZTZH1inCYdrhVudNXwJSulIMA=",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.0.0",
+ "esutils": "^2.0.2",
+ "js-tokens": "^3.0.0"
+ }
+ },
+ "@babel/template": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.55.tgz",
+ "integrity": "sha1-xsqw4nIrpeM/4DQHO20xZzq6Mm4=",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "7.0.0-beta.55",
+ "@babel/parser": "7.0.0-beta.55",
+ "@babel/types": "7.0.0-beta.55",
+ "lodash": "^4.17.10"
+ }
+ },
+ "@babel/traverse": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.55.tgz",
+ "integrity": "sha1-UL5dD8xcxKwCCnsMUZvo2uNF1L4=",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "7.0.0-beta.55",
+ "@babel/generator": "7.0.0-beta.55",
+ "@babel/helper-function-name": "7.0.0-beta.55",
+ "@babel/helper-split-export-declaration": "7.0.0-beta.55",
+ "@babel/parser": "7.0.0-beta.55",
+ "@babel/types": "7.0.0-beta.55",
+ "debug": "^3.1.0",
+ "globals": "^11.1.0",
+ "lodash": "^4.17.10"
+ }
+ },
+ "@babel/types": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.55.tgz",
+ "integrity": "sha1-d1XJ0uWDFaZPBdjPMyI3m+FtkZk=",
+ "dev": true,
+ "requires": {
+ "esutils": "^2.0.2",
+ "lodash": "^4.17.10",
+ "to-fast-properties": "^2.0.0"
+ }
+ },
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
+ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "debug": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+ "dev": true,
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "globals": {
+ "version": "11.7.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz",
+ "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "jsesc": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz",
+ "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.4.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz",
+ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.0.0-beta.44",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.44.tgz",
+ "integrity": "sha512-Il19yJvy7vMFm8AVAh6OZzaFoAd0hbkeMZiX3P5HGD+z7dyI7RzndHB0dg6Urh/VAFfHtpOIzDUSxmY6coyZWQ==",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.0.0",
+ "esutils": "^2.0.2",
+ "js-tokens": "^3.0.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
+ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.4.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz",
+ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "@babel/parser": {
+ "version": "7.0.0-beta.55",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.55.tgz",
+ "integrity": "sha1-ClJ+/BSMbIzYXV/92srYF6La7rI=",
+ "dev": true
+ },
+ "@babel/template": {
+ "version": "7.0.0-beta.44",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.44.tgz",
+ "integrity": "sha512-w750Sloq0UNifLx1rUqwfbnC6uSUk0mfwwgGRfdLiaUzfAOiH0tHJE6ILQIUi3KYkjiCDTskoIsnfqZvWLBDng==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "7.0.0-beta.44",
+ "@babel/types": "7.0.0-beta.44",
+ "babylon": "7.0.0-beta.44",
+ "lodash": "^4.2.0"
+ },
+ "dependencies": {
+ "babylon": {
+ "version": "7.0.0-beta.44",
+ "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.44.tgz",
+ "integrity": "sha512-5Hlm13BJVAioCHpImtFqNOF2H3ieTOHd0fmFGMxOJ9jgeFqeAwsv3u5P5cR7CSeFrkgHsT19DgFJkHV0/Mcd8g==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/traverse": {
+ "version": "7.0.0-beta.44",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.44.tgz",
+ "integrity": "sha512-UHuDz8ukQkJCDASKHf+oDt3FVUzFd+QYfuBIsiNu/4+/ix6pP/C+uQZJ6K1oEfbCMv/IKWbgDEh7fcsnIE5AtA==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "7.0.0-beta.44",
+ "@babel/generator": "7.0.0-beta.44",
+ "@babel/helper-function-name": "7.0.0-beta.44",
+ "@babel/helper-split-export-declaration": "7.0.0-beta.44",
+ "@babel/types": "7.0.0-beta.44",
+ "babylon": "7.0.0-beta.44",
+ "debug": "^3.1.0",
+ "globals": "^11.1.0",
+ "invariant": "^2.2.0",
+ "lodash": "^4.2.0"
+ },
+ "dependencies": {
+ "babylon": {
+ "version": "7.0.0-beta.44",
+ "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.44.tgz",
+ "integrity": "sha512-5Hlm13BJVAioCHpImtFqNOF2H3ieTOHd0fmFGMxOJ9jgeFqeAwsv3u5P5cR7CSeFrkgHsT19DgFJkHV0/Mcd8g==",
+ "dev": true
+ },
+ "debug": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+ "dev": true,
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "globals": {
+ "version": "11.7.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz",
+ "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/types": {
+ "version": "7.0.0-beta.44",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.44.tgz",
+ "integrity": "sha512-5eTV4WRmqbaFM3v9gHAIljEQJU4Ssc6fxL61JN+Oe2ga/BwyjzjamwkCVVAQjHGuAX8i0BWo42dshL8eO5KfLQ==",
+ "dev": true,
+ "requires": {
+ "esutils": "^2.0.2",
+ "lodash": "^4.2.0",
+ "to-fast-properties": "^2.0.0"
+ }
+ },
+ "@types/estree": {
+ "version": "0.0.39",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
+ "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
+ "dev": true
+ },
+ "@types/node": {
+ "version": "10.5.4",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.4.tgz",
+ "integrity": "sha512-8TqvB0ReZWwtcd3LXq3YSrBoLyXFgBX/sBZfGye9+YS8zH7/g+i6QRIuiDmwBoTzcQ/pk89nZYTYU4c5akKkzw==",
+ "dev": true
+ },
"JSONStream": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz",
@@ -122,17 +672,6 @@
"integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=",
"dev": true
},
- "align-text": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
- "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
- "dev": true,
- "requires": {
- "kind-of": "^3.0.2",
- "longest": "^1.0.1",
- "repeat-string": "^1.5.2"
- }
- },
"amqplib": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/amqplib/-/amqplib-0.5.2.tgz",
@@ -190,6 +729,7 @@
},
"ansi-styles": {
"version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
"dev": true
},
@@ -349,12 +889,6 @@
"acorn": "^4.0.3"
}
},
- "async": {
- "version": "0.2.10",
- "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz",
- "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=",
- "dev": true
- },
"async-each": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz",
@@ -493,6 +1027,28 @@
}
}
},
+ "babel-eslint": {
+ "version": "8.2.6",
+ "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-8.2.6.tgz",
+ "integrity": "sha512-aCdHjhzcILdP8c9lej7hvXKvQieyRt20SF102SIGyY4cUIiw6UaAtK4j2o3dXX74jEmy0TJ0CEhv4fTIM3SzcA==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "7.0.0-beta.44",
+ "@babel/traverse": "7.0.0-beta.44",
+ "@babel/types": "7.0.0-beta.44",
+ "babylon": "7.0.0-beta.44",
+ "eslint-scope": "3.7.1",
+ "eslint-visitor-keys": "^1.0.0"
+ },
+ "dependencies": {
+ "babylon": {
+ "version": "7.0.0-beta.44",
+ "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.44.tgz",
+ "integrity": "sha512-5Hlm13BJVAioCHpImtFqNOF2H3ieTOHd0fmFGMxOJ9jgeFqeAwsv3u5P5cR7CSeFrkgHsT19DgFJkHV0/Mcd8g==",
+ "dev": true
+ }
+ }
+ },
"babel-generator": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz",
@@ -541,6 +1097,18 @@
"lodash": "^4.17.4"
}
},
+ "babel-helper-evaluate-path": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.4.3.tgz",
+ "integrity": "sha1-ComvcCwGshcCf6NxkI3UmJ0+Yz8=",
+ "dev": true
+ },
+ "babel-helper-flip-expressions": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.4.3.tgz",
+ "integrity": "sha1-NpZzahKKwYvCUlS19AoizrPB0/0=",
+ "dev": true
+ },
"babel-helper-function-name": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz",
@@ -574,6 +1142,24 @@
"babel-types": "^6.24.1"
}
},
+ "babel-helper-is-nodes-equiv": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-is-nodes-equiv/-/babel-helper-is-nodes-equiv-0.0.1.tgz",
+ "integrity": "sha1-NOmzALFHnd2Y7HfqC76TQt/jloQ=",
+ "dev": true
+ },
+ "babel-helper-is-void-0": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-helper-is-void-0/-/babel-helper-is-void-0-0.4.3.tgz",
+ "integrity": "sha1-fZwBtFYee5Xb2g9u7kj1tg5nMT4=",
+ "dev": true
+ },
+ "babel-helper-mark-eval-scopes": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.4.3.tgz",
+ "integrity": "sha1-0kSjvvmESHJgP/tG4izorN9VFWI=",
+ "dev": true
+ },
"babel-helper-optimise-call-expression": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz",
@@ -608,6 +1194,12 @@
"babel-types": "^6.24.1"
}
},
+ "babel-helper-remove-or-void": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.4.3.tgz",
+ "integrity": "sha1-pPA7QAd6D/6I5F0HAQ3uJB/1rmA=",
+ "dev": true
+ },
"babel-helper-replace-supers": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz",
@@ -622,6 +1214,12 @@
"babel-types": "^6.24.1"
}
},
+ "babel-helper-to-multiple-sequence-expressions": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.4.3.tgz",
+ "integrity": "sha1-W1GLESf0ezA4dzOGoVYaK0jmMrY=",
+ "dev": true
+ },
"babel-helpers": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
@@ -641,6 +1239,31 @@
"babel-runtime": "^6.22.0"
}
},
+ "babel-minify": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-minify/-/babel-minify-0.4.3.tgz",
+ "integrity": "sha1-2Ufk7WtibcjCVofyQsJcvPbygaY=",
+ "dev": true,
+ "requires": {
+ "@babel/core": "^7.0.0-beta.46",
+ "babel-preset-minify": "^0.4.3",
+ "fs-readdir-recursive": "^1.1.0",
+ "mkdirp": "^0.5.1",
+ "util.promisify": "^1.0.0",
+ "yargs-parser": "^10.0.0"
+ },
+ "dependencies": {
+ "yargs-parser": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz",
+ "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==",
+ "dev": true,
+ "requires": {
+ "camelcase": "^4.1.0"
+ }
+ }
+ }
+ },
"babel-plugin-add-module-exports": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-0.2.1.tgz",
@@ -1221,12 +1844,113 @@
}
}
},
+ "babel-plugin-minify-builtins": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.4.3.tgz",
+ "integrity": "sha1-nqPVn0rEp7uVjXEtKVVqH4b3+B4=",
+ "dev": true,
+ "requires": {
+ "babel-helper-evaluate-path": "^0.4.3"
+ }
+ },
+ "babel-plugin-minify-constant-folding": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.4.3.tgz",
+ "integrity": "sha1-MA+d6N2ghEoXaxk2U5YOJK0z4ZE=",
+ "dev": true,
+ "requires": {
+ "babel-helper-evaluate-path": "^0.4.3"
+ }
+ },
+ "babel-plugin-minify-dead-code-elimination": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.4.3.tgz",
+ "integrity": "sha1-c2KCZYZPkAjQAnUG9Yq+s8HQLZg=",
+ "dev": true,
+ "requires": {
+ "babel-helper-evaluate-path": "^0.4.3",
+ "babel-helper-mark-eval-scopes": "^0.4.3",
+ "babel-helper-remove-or-void": "^0.4.3",
+ "lodash.some": "^4.6.0"
+ }
+ },
+ "babel-plugin-minify-flip-comparisons": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.4.3.tgz",
+ "integrity": "sha1-AMqHDLjxO0XAOLPB68DyJyk8llo=",
+ "dev": true,
+ "requires": {
+ "babel-helper-is-void-0": "^0.4.3"
+ }
+ },
+ "babel-plugin-minify-guarded-expressions": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.4.3.tgz",
+ "integrity": "sha1-zHCbRFP9IbHzAod0RMifiEJ845c=",
+ "dev": true,
+ "requires": {
+ "babel-helper-flip-expressions": "^0.4.3"
+ }
+ },
+ "babel-plugin-minify-infinity": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.4.3.tgz",
+ "integrity": "sha1-37h2obCKBldjhO8/kuZTumB7Oco=",
+ "dev": true
+ },
+ "babel-plugin-minify-mangle-names": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.4.3.tgz",
+ "integrity": "sha1-FvG/90t6fJPfwkHngx3V+0sCPvc=",
+ "dev": true,
+ "requires": {
+ "babel-helper-mark-eval-scopes": "^0.4.3"
+ }
+ },
+ "babel-plugin-minify-numeric-literals": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.4.3.tgz",
+ "integrity": "sha1-jk/VYcefeAEob/YOjF/Z3u6TwLw=",
+ "dev": true
+ },
+ "babel-plugin-minify-replace": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.4.3.tgz",
+ "integrity": "sha1-nSifS6FdTmAR6HmfpfG6d+yBIZ0=",
+ "dev": true
+ },
+ "babel-plugin-minify-simplify": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.4.3.tgz",
+ "integrity": "sha1-N3VthcYURktLCSfytOQXGR1Vc4o=",
+ "dev": true,
+ "requires": {
+ "babel-helper-flip-expressions": "^0.4.3",
+ "babel-helper-is-nodes-equiv": "^0.0.1",
+ "babel-helper-to-multiple-sequence-expressions": "^0.4.3"
+ }
+ },
+ "babel-plugin-minify-type-constructors": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.4.3.tgz",
+ "integrity": "sha1-G8bxW4f3qxCF1CszC3F2V6IVZQA=",
+ "dev": true,
+ "requires": {
+ "babel-helper-is-void-0": "^0.4.3"
+ }
+ },
"babel-plugin-syntax-async-functions": {
"version": "6.13.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz",
"integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=",
"dev": true
},
+ "babel-plugin-syntax-async-generators": {
+ "version": "6.13.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz",
+ "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=",
+ "dev": true
+ },
"babel-plugin-syntax-trailing-function-commas": {
"version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz",
@@ -1478,6 +2202,39 @@
"regexpu-core": "^2.0.0"
}
},
+ "babel-plugin-transform-inline-consecutive-adds": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.4.3.tgz",
+ "integrity": "sha1-Mj1Ho+pjqDp6w8gRro5pQfrysNE=",
+ "dev": true
+ },
+ "babel-plugin-transform-member-expression-literals": {
+ "version": "6.9.4",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.9.4.tgz",
+ "integrity": "sha1-NwOcmgwzE6OUlfqsL/OmtbnQOL8=",
+ "dev": true
+ },
+ "babel-plugin-transform-merge-sibling-variables": {
+ "version": "6.9.4",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.9.4.tgz",
+ "integrity": "sha1-hbQi/DN3tEnJ0c3kQIcgNTJAHa4=",
+ "dev": true
+ },
+ "babel-plugin-transform-minify-booleans": {
+ "version": "6.9.4",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.9.4.tgz",
+ "integrity": "sha1-rLs+VqNVXdI5KOS1gtKFFi3SsZg=",
+ "dev": true
+ },
+ "babel-plugin-transform-property-literals": {
+ "version": "6.9.4",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.9.4.tgz",
+ "integrity": "sha1-mMHSHiVXNlc/k+zlRFn2ziSYXTk=",
+ "dev": true,
+ "requires": {
+ "esutils": "^2.0.2"
+ }
+ },
"babel-plugin-transform-regenerator": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz",
@@ -1487,6 +2244,39 @@
"regenerator-transform": "^0.10.0"
}
},
+ "babel-plugin-transform-regexp-constructors": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.4.3.tgz",
+ "integrity": "sha1-WLd3W2OvzzMyj66aX4j71PsLSWU=",
+ "dev": true
+ },
+ "babel-plugin-transform-remove-console": {
+ "version": "6.9.4",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.9.4.tgz",
+ "integrity": "sha1-uYA2DAZzhOJLNXpYjYB9PINSd4A=",
+ "dev": true
+ },
+ "babel-plugin-transform-remove-debugger": {
+ "version": "6.9.4",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.9.4.tgz",
+ "integrity": "sha1-QrcnYxyXl44estGZp67IShgznvI=",
+ "dev": true
+ },
+ "babel-plugin-transform-remove-undefined": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.4.3.tgz",
+ "integrity": "sha1-1AsNp/kcCMBsxyt2dHTAHEiU3gI=",
+ "dev": true,
+ "requires": {
+ "babel-helper-evaluate-path": "^0.4.3"
+ }
+ },
+ "babel-plugin-transform-simplify-comparison-operators": {
+ "version": "6.9.4",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.9.4.tgz",
+ "integrity": "sha1-9ir+CWyrDh9ootdT/fKDiIRxzrk=",
+ "dev": true
+ },
"babel-plugin-transform-strict-mode": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz",
@@ -1497,6 +2287,12 @@
"babel-types": "^6.24.1"
}
},
+ "babel-plugin-transform-undefined-to-void": {
+ "version": "6.9.4",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.9.4.tgz",
+ "integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=",
+ "dev": true
+ },
"babel-preset-es2015": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz",
@@ -1539,6 +2335,37 @@
"babel-plugin-transform-async-to-generator": "^6.24.1"
}
},
+ "babel-preset-minify": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/babel-preset-minify/-/babel-preset-minify-0.4.3.tgz",
+ "integrity": "sha1-spw91pGJBThFmPCSuVUVLiah/g8=",
+ "dev": true,
+ "requires": {
+ "babel-plugin-minify-builtins": "^0.4.3",
+ "babel-plugin-minify-constant-folding": "^0.4.3",
+ "babel-plugin-minify-dead-code-elimination": "^0.4.3",
+ "babel-plugin-minify-flip-comparisons": "^0.4.3",
+ "babel-plugin-minify-guarded-expressions": "^0.4.3",
+ "babel-plugin-minify-infinity": "^0.4.3",
+ "babel-plugin-minify-mangle-names": "^0.4.3",
+ "babel-plugin-minify-numeric-literals": "^0.4.3",
+ "babel-plugin-minify-replace": "^0.4.3",
+ "babel-plugin-minify-simplify": "^0.4.3",
+ "babel-plugin-minify-type-constructors": "^0.4.3",
+ "babel-plugin-transform-inline-consecutive-adds": "^0.4.3",
+ "babel-plugin-transform-member-expression-literals": "^6.9.4",
+ "babel-plugin-transform-merge-sibling-variables": "^6.9.4",
+ "babel-plugin-transform-minify-booleans": "^6.9.4",
+ "babel-plugin-transform-property-literals": "^6.9.4",
+ "babel-plugin-transform-regexp-constructors": "^0.4.3",
+ "babel-plugin-transform-remove-console": "^6.9.4",
+ "babel-plugin-transform-remove-debugger": "^6.9.4",
+ "babel-plugin-transform-remove-undefined": "^0.4.3",
+ "babel-plugin-transform-simplify-comparison-operators": "^6.9.4",
+ "babel-plugin-transform-undefined-to-void": "^6.9.4",
+ "lodash.isplainobject": "^4.0.6"
+ }
+ },
"babel-register": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz",
@@ -2127,9 +2954,9 @@
"dev": true
},
"camelcase": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
- "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
+ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
"dev": true
},
"caseless": {
@@ -2147,16 +2974,6 @@
"underscore-contrib": "~0.3.0"
}
},
- "center-align": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
- "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
- "dev": true,
- "requires": {
- "align-text": "^0.1.3",
- "lazy-cache": "^1.0.3"
- }
- },
"chai": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz",
@@ -2506,25 +3323,6 @@
"integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=",
"dev": true
},
- "cliui": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
- "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
- "dev": true,
- "requires": {
- "center-align": "^0.1.1",
- "right-align": "^0.1.1",
- "wordwrap": "0.0.2"
- },
- "dependencies": {
- "wordwrap": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
- "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
- "dev": true
- }
- }
- },
"co": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
@@ -2906,6 +3704,16 @@
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
"dev": true
},
+ "define-properties": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz",
+ "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=",
+ "dev": true,
+ "requires": {
+ "foreach": "^2.0.5",
+ "object-keys": "^1.0.8"
+ }
+ },
"defined": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
@@ -3212,6 +4020,30 @@
"integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=",
"dev": true
},
+ "es-abstract": {
+ "version": "1.12.0",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz",
+ "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==",
+ "dev": true,
+ "requires": {
+ "es-to-primitive": "^1.1.1",
+ "function-bind": "^1.1.1",
+ "has": "^1.0.1",
+ "is-callable": "^1.1.3",
+ "is-regex": "^1.0.4"
+ }
+ },
+ "es-to-primitive": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz",
+ "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=",
+ "dev": true,
+ "requires": {
+ "is-callable": "^1.1.1",
+ "is-date-object": "^1.0.1",
+ "is-symbol": "^1.0.1"
+ }
+ },
"es6-promise": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-2.3.0.tgz",
@@ -3787,6 +4619,12 @@
"for-in": "^0.1.5"
}
},
+ "foreach": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
+ "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=",
+ "dev": true
+ },
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
@@ -3849,6 +4687,12 @@
}
}
},
+ "fs-readdir-recursive": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz",
+ "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==",
+ "dev": true
+ },
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@@ -3896,14 +4740,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -3918,20 +4760,17 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"core-util-is": {
"version": "1.0.2",
@@ -4048,8 +4887,7 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"ini": {
"version": "1.3.5",
@@ -4061,7 +4899,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -4076,7 +4913,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -4084,14 +4920,12 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
@@ -4110,7 +4944,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -4191,8 +5024,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"object-assign": {
"version": "4.1.1",
@@ -4204,7 +5036,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"wrappy": "1"
}
@@ -4326,7 +5157,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -5102,6 +5932,15 @@
"xtend": "^4.0.0"
}
},
+ "invariant": {
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
+ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
+ "dev": true,
+ "requires": {
+ "loose-envify": "^1.0.0"
+ }
+ },
"invert-kv": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
@@ -5129,6 +5968,18 @@
"integrity": "sha1-24l/w/esotUN6UtsjCiWpHcWJ68=",
"dev": true
},
+ "is-callable": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
+ "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
+ "dev": true
+ },
+ "is-date-object": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
+ "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
+ "dev": true
+ },
"is-dotfile": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz",
@@ -5259,6 +6110,15 @@
"dev": true,
"optional": true
},
+ "is-regex": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
+ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
+ "dev": true,
+ "requires": {
+ "has": "^1.0.1"
+ }
+ },
"is-resolvable": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz",
@@ -5271,6 +6131,12 @@
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
"dev": true
},
+ "is-symbol": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz",
+ "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=",
+ "dev": true
+ },
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
@@ -5316,6 +6182,12 @@
"integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=",
"dev": true
},
+ "js-tokens": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
+ "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
+ "dev": true
+ },
"js-yaml": {
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz",
@@ -5658,12 +6530,6 @@
}
}
},
- "lazy-cache": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
- "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=",
- "dev": true
- },
"lcid": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
@@ -5753,12 +6619,24 @@
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
"dev": true
},
+ "lodash.isplainobject": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
+ "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=",
+ "dev": true
+ },
"lodash.memoize": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz",
"integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=",
"dev": true
},
+ "lodash.some": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz",
+ "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=",
+ "dev": true
+ },
"log-driver": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz",
@@ -6008,11 +6886,14 @@
}
}
},
- "longest": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
- "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
- "dev": true
+ "loose-envify": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
+ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
+ "dev": true,
+ "requires": {
+ "js-tokens": "^3.0.0 || ^4.0.0"
+ }
},
"lru-cache": {
"version": "2.2.4",
@@ -9147,6 +10028,22 @@
"integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=",
"dev": true
},
+ "object-keys": {
+ "version": "1.0.12",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz",
+ "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==",
+ "dev": true
+ },
+ "object.getownpropertydescriptors": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz",
+ "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.2",
+ "es-abstract": "^1.5.1"
+ }
+ },
"object.omit": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz",
@@ -10138,15 +11035,6 @@
"integrity": "sha1-/s5hv6DBtSoga9axgZgYS91SOjs=",
"dev": true
},
- "right-align": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
- "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
- "dev": true,
- "requires": {
- "align-text": "^0.1.1"
- }
- },
"rimraf": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
@@ -10167,12 +11055,13 @@
}
},
"rollup": {
- "version": "0.36.4",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.36.4.tgz",
- "integrity": "sha1-oiRJTFOGwdc9OPe7hvafXrARo9I=",
+ "version": "0.63.4",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.63.4.tgz",
+ "integrity": "sha512-IGTH7u0P6bmu7cXL0g11UDYTR9WKku70cYlqVyOYdqLoQopBGmCbGC3SMeheqHymnehHe/5yf6BJ6BEoxQBVTQ==",
"dev": true,
"requires": {
- "source-map-support": "^0.4.0"
+ "@types/estree": "0.0.39",
+ "@types/node": "*"
}
},
"rollup-plugin-node-resolve": {
@@ -10853,6 +11742,12 @@
"integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
"dev": true
},
+ "to-fast-properties": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",
+ "dev": true
+ },
"tough-cookie": {
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz",
@@ -10945,44 +11840,6 @@
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
"dev": true
},
- "uglify-js": {
- "version": "2.7.5",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.7.5.tgz",
- "integrity": "sha1-RhLAx7qu4rp8SH3kkErhIgefLKg=",
- "dev": true,
- "requires": {
- "async": "~0.2.6",
- "source-map": "~0.5.1",
- "uglify-to-browserify": "~1.0.0",
- "yargs": "~3.10.0"
- },
- "dependencies": {
- "source-map": {
- "version": "0.5.7",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
- "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
- "dev": true
- },
- "yargs": {
- "version": "3.10.0",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
- "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
- "dev": true,
- "requires": {
- "camelcase": "^1.0.2",
- "cliui": "^2.1.0",
- "decamelize": "^1.0.0",
- "window-size": "0.1.0"
- }
- }
- }
- },
- "uglify-to-browserify": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
- "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
- "dev": true
- },
"ultron": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz",
@@ -11081,6 +11938,16 @@
"integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=",
"dev": true
},
+ "util.promisify": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz",
+ "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.2",
+ "object.getownpropertydescriptors": "^2.0.3"
+ }
+ },
"utile": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/utile/-/utile-0.3.0.tgz",
@@ -11167,12 +12034,6 @@
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
"dev": true
},
- "window-size": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
- "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
- "dev": true
- },
"winston": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/winston/-/winston-2.1.1.tgz",
diff --git a/package.json b/package.json
index 8f75693..2e82c55 100644
--- a/package.json
+++ b/package.json
@@ -21,8 +21,11 @@
"dependencies": {},
"devDependencies": {
"babel-core": "^6.26.3",
+ "babel-eslint": "^8.2.6",
+ "babel-minify": "^0.4.3",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-istanbul": "^2.0.1",
+ "babel-plugin-syntax-async-generators": "^6.13.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"babel-preset-es2015": "^6.3.13",
"babel-preset-es2017": "^6.22.0",
@@ -49,12 +52,11 @@
"native-promise-only": "^0.8.0-a",
"nyc": "^11.8.0",
"rimraf": "^2.5.0",
- "rollup": "^0.36.3",
+ "rollup": "^0.63.4",
"rollup-plugin-node-resolve": "^2.0.0",
"rollup-plugin-npm": "^2.0.0",
"rsvp": "^3.0.18",
"semver": "^5.5.0",
- "uglify-js": "~2.7.3",
"yargs": "^11.0.0"
},
"scripts": {
diff --git a/support/build.test.js b/support/build.test.js
index 02f11ce..0951270 100644
--- a/support/build.test.js
+++ b/support/build.test.js
@@ -74,14 +74,14 @@ describe("ES Modules", () => {
before(() => {
return rollup({
- entry: __dirname + "/es.test.js",
+ input: __dirname + "/es.test.js",
plugins: [
rollupPluginNodeResolve()
]
}).then((bundle) => {
return bundle.write({
format: "umd",
- dest: buildFile
+ file: buildFile
});
});
});
diff --git a/support/build/aggregate-bundle.js b/support/build/aggregate-bundle.js
index 9430822..452a1f1 100644
--- a/support/build/aggregate-bundle.js
+++ b/support/build/aggregate-bundle.js
@@ -2,14 +2,14 @@ const {rollup} = require('rollup');
const nodeResolve = require('rollup-plugin-node-resolve');
rollup({
- entry: 'build-es/index.js',
+ input: 'build-es/index.js',
plugins: [ nodeResolve() ]
})
.then(( bundle ) => {
return bundle.write({
format: 'umd',
- moduleName: 'async',
- dest: 'build/dist/async.js'
+ name: 'async',
+ file: 'build/dist/async.js'
});
})
.catch((err) => { throw err; });
diff --git a/test/asyncFunctions.js b/test/asyncFunctions.js
index 894b32b..6bd7a8d 100644
--- a/test/asyncFunctions.js
+++ b/test/asyncFunctions.js
@@ -11,12 +11,29 @@ function supportsAsync() {
return supported;
}
+function supportsAsyncGenerators() {
+ var supported;
+ try {
+ /* eslint no-eval: 0 */
+ supported = eval('(async function * () { yield await 1 })');
+ } catch (e) {
+ supported = false;
+ }
+ return supported;
+}
+
describe('async function support', function () {
- this.timeout(100);
+ this.timeout(200);
if (supportsAsync()) {
- require('./es2017/asyncFunctions.js')();
+ require('./es2017/asyncFunctions.js').call(this);
} else {
it('should not test async functions in this environment');
}
+
+ if (supportsAsyncGenerators()) {
+ require('./es2017/asyncGenerators.js').call(this);
+ } else {
+ it('should not test async generators in this environment');
+ }
});
diff --git a/test/es2017/asyncGenerators.js b/test/es2017/asyncGenerators.js
new file mode 100644
index 0000000..c9be07e
--- /dev/null
+++ b/test/es2017/asyncGenerators.js
@@ -0,0 +1,85 @@
+var async = require('../../lib');
+const {expect} = require('chai');
+
+const delay = ms => new Promise(resolve => setTimeout(resolve, ms))
+
+module.exports = function () {
+ async function * range (num) {
+ for(let i = 0; i < num; i++) {
+ await delay(1)
+ yield i
+ }
+ }
+
+ function AsyncIterable (size) {
+ // cant use method shorthand because babel doesnt parse it right
+ async function * iterator () {
+ let idx = 0
+ while (idx < size) {
+ yield idx
+ await delay(1)
+ idx++
+ }
+ }
+ return {
+ [Symbol.asyncIterator]: iterator
+ }
+ }
+
+ it('should handle async generators in each', (done) => {
+ const calls = []
+ async.each(range(5),
+ async (val) => {
+ calls.push(val)
+ await delay(5)
+ }, (err) => {
+ if (err) throw err
+ expect(calls).to.eql([0, 1, 2, 3, 4])
+ done()
+ }
+ )
+ });
+
+ it('should handle async generators in eachLimit', (done) => {
+ const calls = []
+ async.eachLimit(range(5), 2,
+ async (val) => {
+ calls.push(val)
+ await delay(5)
+ }, (err) => {
+ if (err) throw err
+ expect(calls).to.eql([0, 1, 2, 3, 4])
+ done()
+ }
+ )
+ });
+
+ it('should handle async generators in eachSeries', (done) => {
+ const calls = []
+ async.eachSeries(range(5),
+ async (val) => {
+ calls.push(val)
+ await delay(5)
+ }, (err) => {
+ if (err) throw err
+ expect(calls).to.eql([0, 1, 2, 3, 4])
+ done()
+ }
+ )
+ });
+
+
+ it('should handle async iterables in each', (done) => {
+ const calls = []
+ async.each(new AsyncIterable(5),
+ async (val) => {
+ calls.push(val)
+ await delay(5)
+ }, (err) => {
+ if (err) throw err
+ expect(calls).to.eql([0, 1, 2, 3, 4])
+ done()
+ }
+ )
+ });
+}