Skip to content

jb55/pickrand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Pick a random element from an array

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published