random-id-generator
v0.0.2
Published
generate ramdon id
Downloads
6
Readme
Random Id Generator
Javascript Random ID Generator.
Generate a random string from character 'a' to 'z', from 0 to 9, and from 'A' to 'Z'.
Usage
npm install random-id-generator
let randomIdGenerator = require('random-id-generator');
let defaultLengthId = randomIdGenerator();
//defaultLengthId 3KDl9x
//default length is 6
let specifiedLengthId = randomIdGenerator(10);
//specifiedLengthId 8HdySjG61x
//10 length
Test
Using mocha to run tests.
- Install
Mocha
:
npm install mocha -g
- Run the tests:
mocha