1.0.0 • Published 8 years ago

random-dx v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

random-dx

Return a value equal to the roll of a die.

MIT License

build:? coverage:?

Install

$ npm install --save random-dx 

Usage

var dice = require('random-dx');

// API
// - dice.d4()
// - dice.d6()
// - dice.d8()
// - dice.d10()
// - dice.d12()
// - dice.d20()
// - dice.d30()
// - dice.d100() 

These are just wrappers around natural() but are convenient for use by games.

dice.d20();
// => 13

dice.d6();
// => 4

Related

Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please create an issue.