blob: 38920a31d67981f3a9101ad30ccfe5e05d8131ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
'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;
|