/logistic-progressor

A sigmoid function based progress bar

Primary LanguageJavaScript

Logistic Progressor

Build Status npm

A utility library to create an infinitely advancing progress bars. The module only implements the logic, the styling is totally up to how you want to implement it, you can create your own progress-bar using jQuery and bootstrap or maybe using react or something simple on the console using gauge.

Demo

The library exposes a stream, which emits values starting from 0 and logistically increasing up until 100. The closer the value gets to 100, the smaller jumps it takes to get the next value, thus never actually reaching 100.

Install

npm i logistic-progressor --save

Usage

const Rx = require('rx')
const create = require('logistic-progressor')
var value = false
const input = new Rx.BehaviorSubject(value)

create(input).subscribe(x => console.log(x))

setInterval(() => {
  value = ! value
  input.onNext(value)
}, 1000)