@tomsd/rand
v3.1.8
Published
functions returning random values
Downloads
4
Readme
@tomsd/rand
functions returning random values
Installation
npm install @tomsd/rand
Usage
import { Rand } from "@tomsd/rand";
console.log(Rand.char()); // one character that is between a and z
console.log(Rand.str()); // 5 character string
const length_wanted = 8;
console.log(rand.str(length_wanted).length); // 8
console.log(rand.id()); // random string
const prefix_str = "abc";
console.log(rand.id(prefix_str)); // prefixed