system_assignation/node_modules/cli-spinners/index.js

18 lines
448 B
JavaScript
Raw Normal View History

2022-03-24 09:22:39 -04:00
'use strict';
const spinners = Object.assign({}, require('./spinners.json'));
const spinnersList = Object.keys(spinners);
Object.defineProperty(spinners, 'random', {
get() {
const randomIndex = Math.floor(Math.random() * spinnersList.length);
const spinnerName = spinnersList[randomIndex];
return spinners[spinnerName];
}
});
module.exports = spinners;
// TODO: Remove this for the next major release
module.exports.default = spinners;