root / HServer / 00.Server / 00.Program / node_modules / async / every.js
이력 | 보기 | 이력해설 | 다운로드 (1.66 KB)
1 | 39 | HKM | 'use strict';
|
---|---|---|---|
2 | |||
3 | Object.defineProperty(exports, "__esModule", {
|
||
4 | value: true |
||
5 | }); |
||
6 | |||
7 | var _createTester = require('./internal/createTester'); |
||
8 | |||
9 | var _createTester2 = _interopRequireDefault(_createTester);
|
||
10 | |||
11 | var _eachOf = require('./eachOf'); |
||
12 | |||
13 | var _eachOf2 = _interopRequireDefault(_eachOf);
|
||
14 | |||
15 | var _notId = require('./internal/notId'); |
||
16 | |||
17 | var _notId2 = _interopRequireDefault(_notId);
|
||
18 | |||
19 | function _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 {Function} iteratee - A truth test to apply to each item in the
|
||
33 | * collection in parallel. The iteratee is passed a `callback(err, truthValue)`
|
||
34 | * which must be called with a boolean argument once it has completed. Invoked
|
||
35 | * 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 | */
|
||
49 | exports.default = (0, _createTester2.default)(_eachOf2.default, _notId2.default, _notId2.default); |
||
50 | module.exports = exports['default']; |