Innovenergy_trunk/frontend/node_modules/elegant-spinner/index.js

16 lines
306 B
JavaScript

'use strict';
var frames = process.platform === 'win32' ?
['-', '\\', '|', '/'] :
['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
module.exports = function () {
var i = 0;
return function () {
return frames[i = ++i % frames.length];
};
};
module.exports.frames = frames;