npm.io
1.1.2 • Published 8 years ago

light-random

Licence
MIT
Version
1.1.2
Deps
0
Size
4 kB
Vulns
0
Weekly
0

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.

Keywords