1.1.4 • Published 5 years ago
@magdalenaromanowska/randomid-generator v1.1.4
General info
- Random ID generator module that creates by default 10-digits ID (mixed letters and numbers).
- One can change amount of digits by giving the number in:
randomID();for example
randomID(25);Installation
- With yarn:
yarn add @magdalenaromanowska/randomid-generator- With npm:
npm i @magdalenaromanowska/randomid-generatorUsage
Import in file:
const randomID = require('@magdalenaromanowska/randomid-generator');And then for example:
console.log(randomID());it will give 10-digits ID.
console.log(randomID(2));it will give 2-digits ID.
console.log(randomID(35));it will give 35-digits ID.
Examples of 10-digits ID:
- zmHsXOmtqN,
- ImfrtZ98Se,
- ysNRKjjgdS.