fast-for
v1.0.2
Published
Optimize your collection looping by 2x faster. Fast For uses for loop that runs only half of your collection's length.
Downloads
4
Maintainers
Readme
fast-for
Optimize your collection looping by 2x faster.
Description
fast-for
optimizes your collection looping by 2x faster. Fast For uses for loop that runs only half of your collection's length by returning 2 items per loop.
Install
$ npm install fast-for
Usage
import fastFor from 'fast-for';
const testArray = [...Array(1000).keys()];
fastFor(({ first, second }) => {
console.log({ first, second }); // this loop will run 500x instead of 1000x
}, testArray);
License
MIT License: Pj Salita <[email protected]>