-
Notifications
You must be signed in to change notification settings - Fork 0
toArray
김태헌 edited this page Sep 26, 2024
·
4 revisions
import { toArray } from 'mori-ts';
const iter = [1, 2, 3];
const result = toArray(iter); // [1, 2, 3]
import { toArray } from 'mori-ts';
async function* asyncIterable() {
yield 1;
yield 2;
yield 3;
}
const result = await toArray(asyncIterable()); // [1, 2, 3]
https://github.com/gangnamssal/mori-ts/blob/main/src/test/to-array.spec.ts