Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

all.js 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _createTester = require('./internal/createTester');
  6. var _createTester2 = _interopRequireDefault(_createTester);
  7. var _eachOf = require('./eachOf');
  8. var _eachOf2 = _interopRequireDefault(_eachOf);
  9. var _awaitify = require('./internal/awaitify');
  10. var _awaitify2 = _interopRequireDefault(_awaitify);
  11. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  12. /**
  13. * Returns `true` if every element in `coll` satisfies an async test. If any
  14. * iteratee call returns `false`, the main `callback` is immediately called.
  15. *
  16. * @name every
  17. * @static
  18. * @memberOf module:Collections
  19. * @method
  20. * @alias all
  21. * @category Collection
  22. * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
  23. * @param {AsyncFunction} iteratee - An async truth test to apply to each item
  24. * in the collection in parallel.
  25. * The iteratee must complete with a boolean result value.
  26. * Invoked with (item, callback).
  27. * @param {Function} [callback] - A callback which is called after all the
  28. * `iteratee` functions have finished. Result will be either `true` or `false`
  29. * depending on the values of the async tests. Invoked with (err, result).
  30. * @returns {Promise} a promise, if no callback provided
  31. * @example
  32. *
  33. * async.every(['file1','file2','file3'], function(filePath, callback) {
  34. * fs.access(filePath, function(err) {
  35. * callback(null, !err)
  36. * });
  37. * }, function(err, result) {
  38. * // if result is true then every file exists
  39. * });
  40. */
  41. function every(coll, iteratee, callback) {
  42. return (0, _createTester2.default)(bool => !bool, res => !res)(_eachOf2.default, coll, iteratee, callback);
  43. }
  44. exports.default = (0, _awaitify2.default)(every, 3);
  45. module.exports = exports['default'];