1.1.1 ā€¢ Published 2 years ago

@wborkowski/randomid-generator v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

This package generate an unique identity (ID)

Install

npm i @wborkowski/randomid-generator

Usage

// import
const randomID = require('@wborkowski/randomid-generator');

// id default length (8 characters)
const id = randomID(); //Tq40D3f1

// id length = 12
const id = randomID(12); //YvQsT30b1AD1

// only numbers
const id = randomID(9, 'num'); //037982139

// only letters
console.log(randomID(10, 'let')); //ANspWeViOe

Author

šŸ‘¤ Wojciech Borkowski