Skip to content
Animated command line loading indicator using Unicode braille patterns ⠷
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples simplify examples May 17, 2016
README.md Update README.md Apr 6, 2017
index.js
package.json 0.0.4 May 17, 2016

README.md

braille-pattern-cli-loading-indicator CircleCI NPM Version

Animated command line loading indicator using Unicode braille patterns (based on Heroku CLI).

size rotation preview sample code
large cw examples/formatted.js
small ccw examples/formatted-multicolor.js

usage

  • Use start() and stop() to enable or disable the loading indicator.
  • Optionally specify rotation as cw (clockwise) or ccw (counterclockwise)
  • Optionally provide a custom format function to add text or colors for the loading indicator.
'use strict'
const LoadingIndicator = require('braille-pattern-cli-loading-indicator')

const loader = new LoadingIndicator({
  size: 'large',
  rotation: 'cw',
  format: function (pattern) {
    return 'charging plasma cannon ' + pattern
  }
})

// Display loading indicator for 5 seconds, and then stop.
loader.start()
setTimeout(function () { loader.stop() }, 5000)

credits

heavily inspired by heroku cli loading indicator

You can’t perform that action at this time.