@cezary.janicki/randomid-generator

1.0.1 • Public • Published

@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.

4. Troubleshooting

Package Sidebar

Install

npm i @cezary.janicki/randomid-generator

Weekly Downloads

5

Version

1.0.1

License

MIT

Unpacked Size

3.67 kB

Total Files

3

Last publish

Collaborators

  • cezary.janicki