1.2.1 • Published 4 years ago

luckyy v1.2.1

Weekly downloads
93
License
MIT
Repository
-
Last release
4 years ago

Luckyy

GitHub npm Twitter Follow GitHub followers

A small utility library to expand on the random method of the default JavaScript Math object.

Installation

You can install it in your project file and use it as a dependency.

npm install luckyy

Usage

You can import it in your prpject using CommonJs Modules.

Common Js

This mini utility contains two sections. One for whole numbers and the other for Decimals.

// Destructuring the main object.

const { randReal, randDec } = require("luckyy");

// randReal for whole numbers
// randDec for decimal numbers

Methods

Real Numbers

MethodUseParameters
rand()Return a single whole random numberlimit (optional) - The highest random number you can generate. Default is 10
randArray()Return an array of whole random numberslimit (optional) - The highest random in the array. Default - 10 arrLen (optional) - The length of the array. Default - 10
randArrayRange()Return an array of a range of whole numbersstart (required) - The lowest random number in the array limit (required when less than start) - The highest random number in the array. Default - 10 arrLen (optional) - The length of the array. Default - 10

Decimal Numbers

MethodUseParameters
rand()Return a single whole random numberdp (optional) - Number of decimal places. Default - 3 limit (optional) - The highest random number you can generate. Default is 10
randArray()Return an array of whole random numbersarrLen (optional) - The length of the array. Default - 10 dp (optional) - Number of decimal places. Default - 3 limit (optional) - The highest random in the array. Default - 10
randArrayRange()Return an array of a range of whole numbersstart (required) - The lowest random number in the array limit (required when less than start) - The highest random number in the array. Default - 10 arrLen (optional) - The length of the array. Default - 10 dp (optional) - Number of decimal places. Default - 3

Contributing

Please submit a pull request if you want to, I'll be glad to merge them

License

MIT

1.2.1

4 years ago

1.2.0

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago