UI for Zipcoin Blue

single.js 1007B

1234567891011121314151617181920212223
  1. "use strict";
  2. var single_1 = require('../operators/single');
  3. /**
  4. * Returns an Observable that emits the single item emitted by the source Observable that matches a specified
  5. * predicate, if that Observable emits one such item. If the source Observable emits more than one such item or no
  6. * such items, notify of an IllegalArgumentException or NoSuchElementException respectively.
  7. *
  8. * <img src="./img/single.png" width="100%">
  9. *
  10. * @throws {EmptyError} Delivers an EmptyError to the Observer's `error`
  11. * callback if the Observable completes before any `next` notification was sent.
  12. * @param {Function} predicate - A predicate function to evaluate items emitted by the source Observable.
  13. * @return {Observable<T>} An Observable that emits the single item emitted by the source Observable that matches
  14. * the predicate.
  15. .
  16. * @method single
  17. * @owner Observable
  18. */
  19. function single(predicate) {
  20. return single_1.single(predicate)(this);
  21. }
  22. exports.single = single;
  23. //# sourceMappingURL=single.js.map