3 Put a little spinner on process.stderr, as unobtrusively as possible.
8 var spinner = require("char-spinner")
10 // All options are optional
11 // even the options argument itself is optional
17 Usually the defaults are what you want. Mostly they're just
18 configurable for testing purposes.
20 * `stream` Output stream. Default=`process.stderr`
21 * `tty` Only show spinner if output stream has a truish `.isTTY`. Default=`true`
22 * `string` String of chars to spin. Default=`'/-\\|'`
23 * `interval` Number of ms between frames, bigger = slower. Default=`50`
24 * `cleanup` Print `'\r \r'` to stream on process exit. Default=`true`
25 * `unref` Unreference the spinner interval so that the process can
26 exit normally. Default=`true`
27 * `delay` Number of frames to "skip over" before printing the spinner.
28 Useful if you want to avoid showing the spinner for very fast
31 Returns the generated interval, if one was created.