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) • 346 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const map_1 = require("../map");
const of_1 = require("../of");
const toArray_1 = require("../toArray");
test("map", async () => {
const result = await toArray_1.toArray(map_1.map((value) => value * 2)(of_1.of(1, 2, 3)));
expect(result).toEqual([2, 4, 6]);
});