0.0.4 • Published 8 years ago

braille-pattern-cli-loading-indicator v0.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

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

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

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')

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

loadingIndicator.start()

setTimeout(function () {
  loadingIndicator.stop()
  console.log('done 💥')
}, 5000)

credits

heavily inspired by heroku cli loading indicator

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago