io-spin
TJ Holowaychuk's go-spin node.js port
Last updated 4 years ago by kchan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install io-spin 
SYNC missed versions from official npm registry.

io-spin

NPM version NPM download Build Status: Linux

Little terminal spinner lib for Node.js and io.js

io-spin.gif

Installation

$ npm install io-spin

Example

var spin = require('io-spin')
var spinner = spin('Fetching data')

spinner.start()
spinner.stop()
spinner.update(placeholder)
// upload placeholder
// eg: update Installing 0% to Installing 1%

API

spin(placeholder, type)

placeholder

Type: string
Default: ''

The placeholder to show with the spinner.

type

Type: string
Default: spin1

The spinner type. Checkout all the spinner types!

.start

Start the spinner.

.stop

Stop the spinner and clear it.

.update(placeholder)

Update the placeholder text.

GIF (original from tj/go-spin)

gif

License

MIT © EGOIST

Current Tags

  • 0.4.1                                ...           latest (4 years ago)

9 Versions

  • 0.4.1                                ...           4 years ago
  • 0.4.0                                ...           4 years ago
  • 0.3.0                                ...           5 years ago
  • 0.2.2                                ...           5 years ago
  • 0.2.1                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.2                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago

Copyright 2014 - 2016 © taobao.org |