1.0.1 • Published 7 months ago

e-generate-random v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

Random-Number-Generator NPM Package

Overview

This npm package provides a simple and easy-to-use JavaScript function to generate random numbers within a specified range. You can set both the start and end boundaries for the range within which you want to generate random numbers. This package is suitable for a wide range of use cases where random numbers are needed.

Installation

To use this package, you can install it via npm:

npm install e-generate-random

Usage

You can use this package by requiring it in your JavaScript/Node.js code. Here's a basic example of how to generate a random number using this package:

const generateRandomNumber = require("e-generate-random");

const randomNum = generateRandomNumber();
console.log(randomNum); // Output: A random number between 1 and 100

You can also specify custom start and end boundaries:

const generateRandomNumber = require("e-generate-random");

const randomNum = generateRandomNumber(10, 20); // Generates a random number between 10 and 20
console.log(randomNum);

Function Signature

generateRandomNumber(end = 100, start = 1)

• end (optional): The upper boundary of the range (default is 100).
• start (optional): The lower boundary of the range (default is 1).

Return Value

The function returns a randomly generated integer within the specified range.

License

This package is distributed under the MIT License. You are free to use it in your projects, both open-source and commercial. Please check the LICENSE file for more information.

Contribution

Author This package was created by IMENAN.