Function: select() 
select<
T>(indexIterator):Operator<T,T>
Defined in: operators/select.ts:26
Creates a stream operator that emits only the values at the specified indices from a source stream.
This operator takes an indexIterator (which can be a synchronous or asynchronous iterator of numbers) and uses it to determine which values from the source stream should be emitted. It effectively acts as a filter, but one that operates on the position of the elements rather than their content.
The operator consumes the source stream and internally buffers its values. At the same time, it pulls indices from the provided iterator. When the current element's index matches an index from the iterator, the element is emitted. This allows for flexible and dynamic data sampling.
Type Parameters 
T 
T = any
The type of the values in the source and output streams.
Parameters 
indexIterator 
An iterator or async iterator that provides the zero-based indices of the elements to be emitted.
AsyncIterator<number, any, undefined> | Iterator<number, any, undefined>
Returns 
Operator<T, T>
An Operator instance that can be used in a stream's pipe method.
Examples 
From select.spec.ts:12
let subject: any = createSubject();
let source: any = subject;
const indexes = [0, 2, 4];
const selectStream = source.pipe(select(indexes[Symbol.iterator]()));
const results: any[] = [];
const consumptionPromise = (async () => {
  for await (const value of eachValueFrom(selectStream)) {
    results.push(value);
  }
})();
subject.next(1);
subject.next(2);
subject.next(3);
subject.next(4);
subject.next(5);
subject.complete();
await consumptionPromise;
expect(results).toEqual([1, 3, 5]);