1.0.2 • Published 2 years ago

fast-for v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

fast-for

Optimize your collection looping by 2x faster.

npm version npm downloads License

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 <pj.salita@gmail.com>