Skip to content

Ultra-lightweight, cryptographically weak, alphanumerical, package-independent random string generator.

License

Notifications You must be signed in to change notification settings

thiagobrez/light-random

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

light-random

Ultra-lightweight, cryptographically weak, alphanumerical, package-independent random string generator.

Installation

npm install --save light-random

or

yarn add light-random

API

lightRandom(length: number): string

Default length: 8

Usage

Require module

const lightRandom = require('light-random');

or import with ES6

import {lightRandom} from 'light-random';

Then call it

lightRandom();
//default length: 8
//outputs 'bkiVCGkd'

lightRandom(15);
//outputs 'NPf78EK3oNPiU3t'

lightRandom(50);
//outputs 'TXU8A9K2cPfA4y76IXy3o4x6SQlxTLA26HOMLklVo4vJ0Rxjdv'

License

MIT.

About

Ultra-lightweight, cryptographically weak, alphanumerical, package-independent random string generator.

Resources

License

Stars

Watchers

Forks

Packages

No packages published