UNPKG

@klodianimeri/pipejs

Version:

Pipe functions that provide convenient and efficient ways to work with iterators.

10 lines (9 loc) 256 B
import { Pipe } from "../pipe.js"; export function mapTo(value: any): Pipe { return () => { return (result: IteratorResult<any>): IteratorResult<any> => { result.value = value; return result; }; } }