braille-pattern-cli-loading-indicator
v0.0.4
Published
Animated CLI loading indicator using Unicode braille patterns
Downloads
14
Readme
braille-pattern-cli-loading-indicator
Animated command line loading indicator using Unicode braille patterns (based on Heroku CLI).
usage
- Use
start()
andstop()
to enable or disable the loading indicator. - Optionally specify
rotation
ascw
(clockwise) orccw
(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