Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { itemFromCollection } from '../utils/random';
- export default class Random {
- element(array) {
- if (!array) {
- throw new Error('An array or string must be specified');
- }
- return itemFromCollection(array);
- }
- }
Add Comment
Please, Sign In to add comment