UNPKG

@rxjs-ninja/rxjs-array

Version:

Operators for RxJS for filtering with boolean logic

28 lines (27 loc) 890 B
/** * @packageDocumentation * @module Array */ import { Observable, Subscribable } from 'rxjs'; /** * Returns an Observable that emits an Array from a Map * * @category Map * * @typeParam K The type of value in the Map key * @typeParam V Type of the value in the Map value * * @param input Input to create the emit values from, can be argument list of Map, an array of Map or an Observable * or Promise source * * @example * Create Array from Map * ```ts * const input = new Map([ [1, 'a'], [2, 'b'], [3, 'c'] ]); * fromMap(input).subscribe(); * ``` * Output: `[1, 'a'], [2, 'b'], [3, 'c']` * * @returns Observable that emits an Array from the input Map */ export declare function fromMap<K extends unknown, V extends unknown>(input: Subscribable<Iterable<Map<K, V>> | Map<K, V>> | Iterable<Map<K, V>> | Map<K, V>): Observable<[K, V][]>;