Notorious Penguin Magicians
    Wondering what’s next for npm?Check out our public roadmap! »

    @f/times

    1.0.0 • Public • Published

    times

    Build status Git tag NPM version Code style

    Run a function n times and aggregate the results into an array

    Installation

    $ npm install @f/times
    

    Usage

    var times = require('@f/times')
     
    times(3, identity) === [0, 1, 2]

    API

    times(n, fn)

    • n - The number of times to run fn(i)
    • fn - Receives a single argument, the current index. Also called with the same this context as times.

    Returns: An array of the return values of fn.

    License

    MIT

    Keywords

    none

    Install

    npm i @f/times

    DownloadsWeekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • avatar