source: trip-planner-front/node_modules/async/all.js@ fa375fe

Last change on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.6 KB
Line 
1'use strict';
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6
7var _createTester = require('./internal/createTester');
8
9var _createTester2 = _interopRequireDefault(_createTester);
10
11var _doParallel = require('./internal/doParallel');
12
13var _doParallel2 = _interopRequireDefault(_doParallel);
14
15var _notId = require('./internal/notId');
16
17var _notId2 = _interopRequireDefault(_notId);
18
19function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
21/**
22 * Returns `true` if every element in `coll` satisfies an async test. If any
23 * iteratee call returns `false`, the main `callback` is immediately called.
24 *
25 * @name every
26 * @static
27 * @memberOf module:Collections
28 * @method
29 * @alias all
30 * @category Collection
31 * @param {Array|Iterable|Object} coll - A collection to iterate over.
32 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
33 * in the collection in parallel.
34 * The iteratee must complete with a boolean result value.
35 * Invoked with (item, callback).
36 * @param {Function} [callback] - A callback which is called after all the
37 * `iteratee` functions have finished. Result will be either `true` or `false`
38 * depending on the values of the async tests. Invoked with (err, result).
39 * @example
40 *
41 * async.every(['file1','file2','file3'], function(filePath, callback) {
42 * fs.access(filePath, function(err) {
43 * callback(null, !err)
44 * });
45 * }, function(err, result) {
46 * // if result is true then every file exists
47 * });
48 */
49exports.default = (0, _doParallel2.default)((0, _createTester2.default)(_notId2.default, _notId2.default));
50module.exports = exports['default'];
Note: See TracBrowser for help on using the repository browser.