Skip to content

Justedlev/just-random

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Just random method

Sometimes during development, there is a need for a random value generator method, JavaScript has a Math.random() method, but we need a method that will return a range of values, and this method can be implemented, but it's even easier to borrow :)

Functions:

jrand(16, 24) - will return integer number in range from 16 to 24.

import { jrand } from "just-random";
const random = jrand(10, 50); // => 17

Releases

No releases published

Packages

No packages published