One straight forward function that returns a random number
between min and max numbers 😍
npm i @ssts/int
import seniorINT from "@ssts/int";
const randomInteger: number = seniorINT(0, 100);
Returns a number
Order | Parameter | Type | Default |
---|---|---|---|
1 | min | number | required |
2 | max | number | required |
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 😍