1.0.1 • Published 8 years ago
hatpicker v1.0.1
HatPicker
Node module for picking numbers out of a hat.
Installation
$ npm install hatpicker
Usage
// require the module
var hatpicker = require(hatpicker)
// example array of names
var names = 'Bob, Joe, Kate, Sam, Sarah'
// create a new hatpicker to pick out of
var hat = new hatpicker(names)
// map the names to a set of results:
`hat.mapNums(hat.generateNums())
Sample output: Map { 'Bob' => 3, 'Joe' => 1, 'Kate' => 5, 'Sam' => 2, 'Sarah' => 4 }