1.0.3 • Published 8 years ago

random-second v1.0.3

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

random-second

Generate a random second.

MIT License

build:? coverage:?

Install

$ npm install --save random-second 

Usage

var randomSecond = require('random-second');

// API
// - randomSecond([options]);

// options
// - min
// - max

By default, returns a minute from 0 to 59. Idea is for generating a clock time.

randomSecond();
// => 37

Optionally specify min, max, or both to limit the range.

randomSecond({ min: 10 });
// => 18

randomSecond({ max: 40 });
// => 23

randomSecond({ min: 10, max: 40 });
// => 32

Related

Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please create an issue.