summaryrefslogtreecommitdiff
path: root/node_modules/async/concatSeries.js
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-11-28 17:14:38 +0100
committerMinteck <contact@minteck.org>2022-11-28 17:14:38 +0100
commit18efd30a263ec0d79a26a82cbd8c90c9f81056b7 (patch)
treeaea01bf3506dda706719fc68eb37b77ed9ef3fe8 /node_modules/async/concatSeries.js
downloadautoreport-18efd30a263ec0d79a26a82cbd8c90c9f81056b7.tar.gz
autoreport-18efd30a263ec0d79a26a82cbd8c90c9f81056b7.tar.bz2
autoreport-18efd30a263ec0d79a26a82cbd8c90c9f81056b7.zip
Open sourceHEADmane
Diffstat (limited to 'node_modules/async/concatSeries.js')
-rw-r--r--node_modules/async/concatSeries.js41
1 files changed, 41 insertions, 0 deletions
diff --git a/node_modules/async/concatSeries.js b/node_modules/async/concatSeries.js
new file mode 100644
index 0000000..84add3b
--- /dev/null
+++ b/node_modules/async/concatSeries.js
@@ -0,0 +1,41 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _concatLimit = require('./concatLimit.js');
+
+var _concatLimit2 = _interopRequireDefault(_concatLimit);
+
+var _awaitify = require('./internal/awaitify.js');
+
+var _awaitify2 = _interopRequireDefault(_awaitify);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.
+ *
+ * @name concatSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.concat]{@link module:Collections.concat}
+ * @category Collection
+ * @alias flatMapSeries
+ * @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).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished, or an error occurs. Results is an array
+ * containing the concatenated results of the `iteratee` function. Invoked with
+ * (err, results).
+ * @returns A Promise, if no callback is passed
+ */
+function concatSeries(coll, iteratee, callback) {
+ return (0, _concatLimit2.default)(coll, 1, iteratee, callback);
+}
+exports.default = (0, _awaitify2.default)(concatSeries, 3);
+module.exports = exports['default']; \ No newline at end of file