@bakkerjoeri/repeat
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

repeat

Repeat a callback a given number of times.

Installation

npm install @bakkerjoeri/repeat

Usage

import repeat from '@bakkerjoeri/repeat';

const count = (i) => console.log(i);
repeat(3, count);
// => 0
// => 1
// => 2

The callback is called with a 0-based iteration count as its first argument.

/@bakkerjoeri/repeat/

    Package Sidebar

    Install

    npm i @bakkerjoeri/repeat

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    2.18 kB

    Total Files

    8

    Last publish

    Collaborators

    • bakkerjoeri