bytespin
v2.0.7
Published
spinner nanocomponent that cycles through a given list of characters
Downloads
5
Readme
bytespin
spinner nanocomponent that cycles through a given list of characters ( demo )
installation
npm install --save bytespin
usage
spinner = Spinner(opts)
creates a new Spinner instance.
{
chars: string // characters to cycle through
speed: number // spinning speed in ms
}
example
var Spinner = require('bytespin')
var spinner = Spinner({ chars: '\\|/-', speed: 125 })
function view (state, emit) {
return `
<div>
${spinner.render(state.fetching)}
</div>`
}