a zip code crypto-currency system good for red ONLY

single.js 1.0KB

1234567891011121314151617181920212223
  1. /** PURE_IMPORTS_START .._operators_single PURE_IMPORTS_END */
  2. import { single as higherOrder } from '../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. export function single(predicate) {
  20. return higherOrder(predicate)(this);
  21. }
  22. //# sourceMappingURL=single.js.map