source: trip-planner-front/node_modules/cli-spinners/index.js@ bdd6491

Last change on this file since bdd6491 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 406 bytes
Line 
1'use strict';
2
3const spinners = Object.assign({}, require('./spinners.json')); // eslint-disable-line import/extensions
4
5const spinnersList = Object.keys(spinners);
6
7Object.defineProperty(spinners, 'random', {
8 get() {
9 const randomIndex = Math.floor(Math.random() * spinnersList.length);
10 const spinnerName = spinnersList[randomIndex];
11 return spinners[spinnerName];
12 }
13});
14
15module.exports = spinners;
Note: See TracBrowser for help on using the repository browser.