@tomsd/rand
TypeScript icon, indicating that this package has built-in type declarations

3.1.8 • Public • Published

@tomsd/rand

functions returning random values

npm NPM npms.io (quality) Libraries.io dependency status for latest release Maintenance

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

Readme

Keywords

none

Package Sidebar

Install

npm i @tomsd/rand

Weekly Downloads

1

Version

3.1.8

License

MIT

Unpacked Size

4.26 kB

Total Files

5

Last publish

Collaborators

  • tomsd