@ssts/int
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

Get a random integer number within a range, between two numbers min and max

One straight forward function that returns a random number between min and max numbers 😍

Install

npm i @ssts/int

Import

import seniorINT from "@ssts/int";

Use

const randomInteger: number = seniorINT(0, 100);

Arguments

Returns a number

Order Parameter Type Default
1 min number required
2 max number required

Examples

import seniorINT from "@ssts/int";

console.log(seniorINT(0, 10));       // 8
console.log(seniorINT(0, 100));      // 55
console.log(seniorINT(-100, 100));   // 74
console.log(seniorINT(-100, 100));   // -61
console.log(seniorINT(15, 222));     // 48





Made With Chocolate By Senior Sedo 😎

Be Chocolateful 💙😍

ssts stands for senior-sedo-typescript 💙

So instead of @senior-sedo-typescript/rand-int

@ssts/int for simplicity sake 😍






Package Sidebar

Install

npm i @ssts/int

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

4.45 kB

Total Files

7

Last publish

Collaborators

  • seniorsedo