fast-for
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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>

Package Sidebar

Install

npm i fast-for

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

3.65 kB

Total Files

5

Last publish

Collaborators

  • pjsalita