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).

10 lines (9 loc) 338 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const of_1 = require("../of"); const take_1 = require("../take"); const toArray_1 = require("../toArray"); test("take", async () => { const result = await toArray_1.toArray(take_1.take(2)(of_1.of(1, 2, 3, 4, 5, 6))); expect(result).toEqual([1, 2]); });