Iterare
iterare
Array methods for ES6 Iterators.
ES6 Iterator library for applying multiple transformations to a collection in a single iteration.
Instead of handling ES6 collections in a messy way like:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
or
1 2 3 4 5 |
|
Using iterare
you can do the same with:
1 2 3 4 5 6 |
|
GIF FTW!
Benchmark based on the example above:
Method | ops/sec |
---|---|
Loop | 2,562,637 ops/sec ±3.95% (80 runs sampled) |
iterare | 2,023,212 ops/sec ±1.38% (84 runs sampled) |
Array method chain | 346,117 ops/sec ±2.68% (82 runs sampled) |
Lodash (with lazy evalution) | 335,890 ops/sec ±0.55% (85 runs sampled) |
RxJS | 29,480 ops/sec ±7.01% (51 runs sampled) |