UNPKG

axax

Version:

A library of async iterator extensions for JavaScript including ```map```, ```reduce```, ```filter```, ```flatMap```, ```pipe``` and [more](https://github.com/jamiemccrindle/axax/blob/master/docs/API.md#functions).

12 lines (11 loc) 450 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const flatten_1 = require("../flatten"); const map_1 = require("../map"); const of_1 = require("../of"); const pipe_1 = require("../pipe"); const toArray_1 = require("../toArray"); test("pipe", async () => { const result = await toArray_1.toArray(pipe_1.pipe(map_1.map(x => of_1.of(x)), flatten_1.flatten)(of_1.of(1, 2, 3))); expect(result).toEqual([1, 2, 3]); });