UNPKG

react-floating-balloons

Version:

Floating colorful balloons with custom names and popping feature

19 lines (16 loc) 385 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.random = random; exports.randomColor = randomColor; function random(min, max) { return Math.floor(Math.random() * (max - min)) + min; } function randomColor(colors) { if (Array.isArray(colors) && colors.length) { return colors[random(0, colors.length)]; } else { return null; } }