Skip to content

Latest commit

 

History

History
31 lines (17 loc) · 361 Bytes

Readme.md

File metadata and controls

31 lines (17 loc) · 361 Bytes

pickrand

Pick a random element from an array

Installation

Component

$ component install jb55/pickrand

Node

$ npm install pickrand

API

var pickrand = require('pickrand') 
var x = pickrand(["bill", "john", "jake"]);

// x can be "bill", "john", or "jake"

var x = pickrand([])

// x is null

License

MIT