@articulate/progress

    0.0.1 • Public • Published

    @articulate/progress

    @articulate/progress Build Status Coverage Status NSP Status

    @articulate/progress

    Cheap, functional, terminal progress bar.

    Next time you're tempted to process.stderr.write('.') to track the progress of a script... don't. Use this instead.

    API

    progress : Object -> Number -> ()

    To setup your progress bar, execute the module with an optional options object:

    const progress = require('@articulate/progress')({ /* options here */ })

    The following options are accepted:

    Name Type Default Description
    label String 'progress' custom label for your progress bar
    stream stream.Writable process.stderr output stream for progress
    width Number 24 max width of the bar

    The returned function accepts a progress ratio between 0 and 1, and writes the progress bar to the output stream. Each time it is called, it will overwrite the previous state of the progress to appear animated in the console.

    const progress = require('@articulate/progress')()
     
    progress(0.55)
    //> progress: ⣠ [==============          ] 55%

    See demo.js for a slightly more complex example.

    Keywords

    none

    Install

    npm i @articulate/progress

    DownloadsWeekly Downloads

    210

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • kfurness
    • amichailevy
    • jltimm
    • jbirkholz
    • auggie
    • forrest.labrum
    • tjsimons88
    • byrdsd
    • tgrossen-articulate
    • nikoden
    • sam-gale
    • glemmi
    • chad-articulate
    • patternleaf
    • kush-articulate
    • ilovitt
    • francyarticulate
    • andrii_kyr
    • msebastiian_lohika
    • vkyianytsia
    • tylerhaas
    • deckeraga
    • toristyner
    • lmallory
    • gera-fsl
    • mmichalski
    • racheldonovan
    • jamesadams11
    • jasminabasurita
    • fromonesrc
    • spencerfdavis
    • pklingem
    • kdstew
    • tecnobrat
    • jrpz
    • flintinatux
    • olena_domchevska
    • obeliaiev
    • caprisone
    • rinatsafin
    • jestefan-fsl
    • mcurran
    • spurr
    • botzo
    • mgreystone
    • tchamblee
    • rpearce
    • patrickeakin
    • bschemmel
    • dietervds
    • vscerchia
    • tylerodonnell
    • esmitharticulate
    • matthewsecrist
    • jesspoemape
    • mwinckler-articulate
    • evil
    • cfriedel
    • dbackes
    • milogert
    • mikeswart
    • brittanystoroz
    • hobbsee
    • melhotiby
    • borbulon
    • mikeolivieri
    • efoberg
    • matty-articulate
    • slodaniel
    • tracytran
    • henryng24
    • natalizh
    • iamwill
    • jalissa
    • gpalmer00
    • prosper.dev
    • mpaupulaire-articulate
    • karlamaye
    • teisia
    • ndavidson
    • nicholasodonnell
    • dpowell
    • aerielk20
    • faylee
    • matt.loberg
    • bobshields
    • jiantjon
    • bmazarelli
    • osoverflow
    • thatpamiam
    • rwc
    • jsebring_articulate
    • pwelch
    • kalebmills
    • sbaumjr