count-between

    3.0.0 • Public • Published

    count-between

    Build Coverage Status

    Count up and down between two numbers.

    Install

    npm install count-between
    

    Usage

    const c = require('count-between')(2, 5, 5)
    
    c(1) // 2
    c(1) // 3
    c(3) // 2
    c(-2) // 4
    c(0) // 4
    c() // 4

    API

    Parameters

    • min {Number} Minimum number.
    • max {Number} Maximum number.
    • initial {Number} Initial number.

    Returns

    Instance API

    Parameters

    • modifier {?Number}

    Returns

    • {Number} Current number.

    Install

    npm i count-between

    DownloadsWeekly Downloads

    77

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    4.15 kB

    Total Files

    5

    Last publish

    Collaborators

    • electerious