@simplej/segmented-progress

1.0.2 • Public • Published

Segmented Progress

A simple utility function for getting segmented progress bar values.

Install

npm install @simplej/segmented-progress

Usage

import segmentedProgress from '@simplej/segmented-progress';

const progress = 0.75;
const total = 1;
const segmentCount = 10;

const segments = segmentedProgress(progress, total, segmentCount);
// segments === [1, 1, 1, 1, 1, 1, 1, 0.5, 0, 0]

/@simplej/segmented-progress/

    Package Sidebar

    Install

    npm i @simplej/segmented-progress

    Weekly Downloads

    2

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    4.29 kB

    Total Files

    7

    Last publish

    Collaborators

    • simplej