Iterable to Array for JavaScript. See docs.
⚠️ This is just an alias forArray.from
. In 99.99999% of the cases please useArray.from
directly.
import {list} from '@iterable-iterator/list';
list('abc'); // ['a', 'b', 'c']
import {nrepeat} from '@iterable-iterator/repeat';
list(nrepeat('A', 3)); // ['A', 'A', 'A']