MCPcopy
hub / github.com/angular/angularfire / traceUntil

Function traceUntil

src/compat/performance/performance.ts:75–88  ·  view source on GitHub ↗
(
  name: string,
  test: (a: T) => boolean,
  options?: { orComplete?: boolean }
)

Source from the content-addressed store, hash-verified

73};
74
75export const traceUntil = <T = any>(
76 name: string,
77 test: (a: T) => boolean,
78 options?: { orComplete?: boolean }
79) => (source$: Observable<T>) => new Observable<T>(subscriber => {
80 const traceSubscription = trace$(name).subscribe();
81 return source$.pipe(
82 tap(
83 a => test(a) && traceSubscription.unsubscribe(),
84 () => undefined,
85 () => options && options.orComplete && traceSubscription.unsubscribe()
86 )
87 ).subscribe(subscriber);
88});
89
90export const traceWhile = <T = any>(
91 name: string,

Callers

nothing calls this directly

Calls 1

trace$Function · 0.85

Tested by

no test coverage detected