every.js 970 B

12345678910111213141516171819202122
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var operators_1 = require("rxjs/operators");
  4. /**
  5. * Returns an Observable that emits whether or not every item of the source satisfies the condition specified.
  6. *
  7. * @example <caption>A simple example emitting true if all elements are less than 5, false otherwise</caption>
  8. * Observable.of(1, 2, 3, 4, 5, 6)
  9. * .every(x => x < 5)
  10. * .subscribe(x => console.log(x)); // -> false
  11. *
  12. * @param {function} predicate A function for determining if an item meets a specified condition.
  13. * @param {any} [thisArg] Optional object to use for `this` in the callback.
  14. * @return {Observable} An Observable of booleans that determines if all items of the source Observable meet the condition specified.
  15. * @method every
  16. * @owner Observable
  17. */
  18. function every(predicate, thisArg) {
  19. return operators_1.every(predicate, thisArg)(this);
  20. }
  21. exports.every = every;
  22. //# sourceMappingURL=every.js.map