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).
11 lines (10 loc) • 415 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const lookahead_1 = require("../lookahead");
const of_1 = require("../of");
const toArray_1 = require("../toArray");
test("lookahead", async () => {
const result = await lookahead_1.lookahead(2)(of_1.of(1, 2, 3));
expect(result.values).toEqual([1, 2]);
expect(await toArray_1.toArray(result.iterable)).toEqual([1, 2, 3]);
});