Functions
multiplexObj
- multiplexObj<A, B>(xforms: IObjectOf<TxLike<A, any>>, rfn?: Reducer<B, [PropertyKey, any]>): Transducer<A, B>
- multiplexObj<A, B>(xforms: IObjectOf<TxLike<A, any>>, src: Iterable<A>): IterableIterator<B>
- multiplexObj<A, B>(xforms: IObjectOf<TxLike<A, any>>, rfn: Reducer<B, [PropertyKey, any]>, src: Iterable<A>): IterableIterator<B>
Type parameters
Parameters
xforms: IObjectOf<TxLike<A, any>>
Optional rfn: Reducer<B, [PropertyKey, any]>
Type parameters
Parameters
xforms: IObjectOf<TxLike<A, any>>
src: Iterable<A>
Returns IterableIterator<B>
Type parameters
Parameters
xforms: IObjectOf<TxLike<A, any>>
rfn: Reducer<B, [PropertyKey, any]>
src: Iterable<A>
Returns IterableIterator<B>
Transducer. Similar to (and building on) {@link (multiplex:1)}, but takes an object of transducers and produces a result object for each input.
[...multiplexObj( { initial: map(x => x.charAt(0)), upper: map(x => x.toUpperCase()), length: map(x => x.length) }, ["Alice", "Bob", "Charlie", "Andy"] )] // [ { length: 5, upper: 'ALICE', initial: 'A' }, // { length: 3, upper: 'BOB', initial: 'B' }, // { length: 7, upper: 'CHARLIE', initial: 'C' }, // { length: 4, upper: 'ANDY', initial: 'A' } ]