random-multiple-integers

1.0.0 • Public • Published

random-multiple-integers

Build Status

This is a program for generating an array containing multiple integers with a specified range

Use examples

First, install this module in your project.

$ npm install random-multiple-integers

Import this module in your source code and call like below.

let RandomInteger = require('random-multiple-integers')
let ri = new RandomInteger()
 
// ri.create(min, max, count)
console.log(ri.create(1, 10, 10));  // -> [9, 4, 2, 6, 6, 2, 5, 1, 8, 10]
console.log(ri.create(-10, 0, 10)); // -> [-6, 0, -5, -2, -6, -4, -8, -3, -10, -9]
console.log(ri.create(1, 1, 1));    // -> [1]

Testing

random-multiple-integers uses jest for testing. You can run test cases by installing dependencies then run "npm test" command.

$ npm install
$ npm test

License

This software is released under the MIT License, see LICENSE.txt.

Package Sidebar

Install

npm i random-multiple-integers

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

4.93 kB

Total Files

8

Last publish

Collaborators

  • wafuwafu13