Function
traceUntil
(
name: string,
test: (a: T) => boolean,
options?: { orComplete?: boolean }
)
Source from the content-addressed store, hash-verified
| 73 | }; |
| 74 | |
| 75 | export 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 | |
| 90 | export const traceWhile = <T = any>( |
| 91 | name: string, |
Callers
nothing calls this directly
Tested by
no test coverage detected