hinata
Your cli spinner which like a marquee.
Last updated 5 years ago by kchan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hinata 
SYNC missed versions from official npm registry.

hinata NPM version NPM downloads Build Status

Your cli spinner which like a marquee.

gif

Install

$ npm install --save hinata

Usage

const Hinata = require('hinata')

const hinata = new Hinata({char: '❤', spacing: 2})

hinata.start()

setTimeout(() => {
  // update loading text
  hinata.text = 'loading something'
}, 2000)

setTimeout(() => {
  // update loading character
  hinata.char = '.'
  // update character spacing
  hinata.spacing = 0
}, 3000)

setTimeout(() => {
  hinata.stop()
}, 10000)

API

hinata([options])

options.text default ''

Placeholder for loading text, eg: Loading in Loading ...

options.char default .

Loading character, eg: in ❤ ❤ ❤ loading webpack

options.length default 3

How many time a loading character should repeat itself.

options.color default false

If set to be true, spinner uses your color instead of a random color.

options.spacing default 0

How many spaces between each loading character.

options.timeout default 100

The timeout to update the spinner.

options.prepend default false

Show loading text at the beginning of the spinner.

License

MIT © EGOIST

Current Tags

  • 0.1.0                                ...           latest (5 years ago)

1 Versions

  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (1)
  • xo ^0.12.1

Copyright 2014 - 2016 © taobao.org |