random-item

Get a random item from an array

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
random-item
4.0.13 years ago8 years agoMinified + gzip package size for random-item in KB

Readme

random-item
Get a random item from an array

Install

$ npm install random-item

Usage

import randomItem from 'random-item';

randomItem(['🐴', '🦄', '🌈']);
//=> '🦄'

randomItem.multiple(['🐴', '🦄', '🌈'], 2);
//=> ['🌈', '🦄']

Related