Icard/angular-clarity-master(work.../node_modules/cli-spinners/index.js

16 lines
406 B
JavaScript
Raw Permalink Normal View History

2024-07-16 14:55:36 +00:00
'use strict';
const spinners = Object.assign({}, require('./spinners.json')); // eslint-disable-line import/extensions
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;