This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
char-spinner with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
Put a little spinner on process.stderr, as unobtrusively as possible.
var spinner = require("char-spinner") // All options are optional // even the options argument itself is optional spinner(options)
Usually the defaults are what you want. Mostly they're just configurable for testing purposes.
streamOutput stream. Default=
ttyOnly show spinner if output stream has a truish
stringString of chars to spin. Default=
intervalNumber of ms between frames, bigger = slower. Default=
'\r \r'to stream on process exit. Default=
unrefUnreference the spinner interval so that the process can exit normally. Default=
delayNumber of frames to "skip over" before printing the spinner. Useful if you want to avoid showing the spinner for very fast actions. Default=
Returns the generated interval, if one was created.