• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ckapps / rxjs / 4851186617

01 May 2023 12:38PM CUT coverage: 100.0%. Remained the same
4851186617

push

github

christophka
build(deps): bump coverallsapp/github-action from 1.2.4 to 2.*.*

17 of 17 branches covered (100.0%)

Branch coverage included in aggregate %.

152 of 152 relevant lines covered (100.0%)

5.22 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/array/operators/transformation/collect-array.operator.ts
1
import { OperatorFunction } from 'rxjs';
2
import { scan } from 'rxjs/operators';
1✔
3

4
/**
5
 * @param seed Optional seed for accumulation
6
 *
7
 * @returns
8
 * An operator that accumulates source emissions
9
 * and emits with an concatted array of source emissions.
10
 *
11
 * @example
12
 * of('c', 'd', 'e').pipe(collectArray(['a', 'b']))
13
 * // (cde|) -> c: ['a', 'b', 'c']
14
 * //   d: ['a', 'b', 'c', 'd']
15
 * //   e: ['a', 'b', 'c', 'd', 'e']
16
 */
17
export function collectArray<T>(seed: T[] = []): OperatorFunction<T, T[]> {
1✔
18
  return scan<T, T[]>((a, c) => [...a, c], seed);
6✔
19
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc