Network Powering Makers

    @writetome51/get-countup-countdown
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.1 • Public • Published

    getCountup(
          startingNumber,
          endingNumber,
          increment? = 1
    ): number[]

    Returns array of numbers in ascending order, i.e., [1,2,3,4,5...].

    getCountdown(
          startingNumber,
          endingNumber,
          increment? = 1
    ): number[]

    Returns array of numbers in descending order, i.e., [5,4,3,2,1...].

    Examples

    getCountup(1, 5);
    // --> [1,2,3,4,5]
    
    getCountdown(5, 1);
    // --> [5,4,3,2,1]
    
    getCountup(-1, 10, 1.5);
    // --> [ -1, 0.5, 2, 3.5, 5, 6.5, 8, 9.5 ]
    
    getCountdown(10, -1, 1.5);
    // --> [ 10, 8.5, 7, 5.5, 4, 2.5, 1, -0.5 ]

    Installation

    npm i @writetome51/get-countup-countdown

    Loading

    import {getCountup, getCountdown}  from '@writetome51/get-countup-countdown';

    Install

    npm i @writetome51/get-countup-countdown

    DownloadsWeekly Downloads

    2

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    4.51 kB

    Total Files

    6

    Last publish

    Collaborators

    • writetome51