Skip to content

mock-end/random-octal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

random-octal

Return a random octal number.

MIT License

build:? coverage:?

Install

$ npm install --save random-octal

Usage

For more use-cases see the tests

var randomOctal = require('random-octal');

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

// options
// - min
// - max

By default it will return an octal number between 0 and 9007199254740992:

randomOctal();
// => '0o147'

Can optionally provide min and max:

randomOctal({ max: 7 });
// => '0o4'

randomOctal({ min: 4, max: 7 });
// => '0o6'

Note: these min and max are inclusive, so they are included in the range.

Related

Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please create an issue.

About

Return a random octal number.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published