char-spinner
Put a little spinner on process.stderr, as unobtrusively as possible.
Last updated 12 years ago by isaacs .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install char-spinner 
SYNC missed versions from official npm registry.

char-spinner

Put a little spinner on process.stderr, as unobtrusively as possible.

USAGE

var spinner = require("char-spinner")

// All options are optional
// even the options argument itself is optional
spinner(options)

OPTIONS

Usually the defaults are what you want. Mostly they're just configurable for testing purposes.

  • stream Output stream. Default=process.stderr
  • tty Only show spinner if output stream has a truish .isTTY. Default=true
  • string String of chars to spin. Default='/-\\|'
  • interval Number of ms between frames, bigger = slower. Default=50
  • cleanup Print '\r \r' to stream on process exit. Default=true
  • unref Unreference the spinner interval so that the process can exit normally. Default=true
  • delay Number of frames to "skip over" before printing the spinner. Useful if you want to avoid showing the spinner for very fast actions. Default=2

Returns the generated interval, if one was created.

Current Tags

  • 1.0.1                                ...           latest (12 years ago)

3 Versions

  • 1.0.1                                ...           12 years ago
  • 1.0.0                                ...           12 years ago
  • 0.0.0                                ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (1)
Dependents (3)

Copyright 2013 - present © cnpmjs.org | Home |