Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Spinner = function Spinner(options) {
options = assign({
color: 'green',
text: '',
stream: process.stderr
}, options || {});
this.text = options.text;
this.color = options.color;
this.spinner = (process.platform === 'win32') ? spinners.line :
(spinners[options.spinner] || spinners.hamburger);
this.interval = this.spinner.interval || 100;
this.stream = options.stream;
this.id = null;
this.frameIndex = 0;
this.enabled = options.enabled || ((this.stream && this.stream.isTTY) && !process.env.CI);
};