random-second

1.0.3 • Public • Published

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.

Package Sidebar

Install

npm i random-second

Weekly Downloads

288

Version

1.0.3

License

MIT

Last publish

Collaborators

  • bubkoo