@cezary.janicki/randomid-generator
v1.0.1
Published
RandomId generator as created in a bootcamp using String Latin Plus
Downloads
7
Maintainers
Readme
@cezary.janicki/randomid-generator
The simple package implemented during 10-Month long Coding Bootcamp by Kodilla.
1. What Does it do?
The package is responsible for creating random ID strings of 12 String Latin Plus characters .
2. How to Use?
To implement this Package follow the steps below.
2.1. Download
Yarn
yarn add @cezary.janicki/randomid-generator
NPM
npm install @cezary.janicki/randomid-generator
2.2. Import in File
require
const randomID = require('@cezary.janicki/randomid-generator');
import
import randomID from '@cezary.janicki/randomid-generator'
2.3. Call a function
randomID()
Creates a random string of 12 characters.
randomID(idLength)
Creates a random string of idLength number of characters.
Enjoy!
3. Usage
This function is useful in generating random ID's for the objects. Caution: This generator does not contain duplicate check. Even though it is very unlikely to create two duplicated ID's, this might happen. Please have that in mind when using this package.