1.0.1 • Published 8 months ago
@monikagie/randomid-generator v1.0.1
@monikagie/randomid-generator
This is a simple package to generate a unique string id for JavaScript. The id value is generated randomly. The id length is set in the idLength parameter when calling the randomID function.
Installation:
To install the package, run the following command in your project directory:
npm install @monikagie/randomid-generatorUsage:
After installing, you can use the package in your file like this:
const randomID = require("@monikagie/randomid-generator");
const id = randomID(8);Parameters:
The idLength parameter specifies the length of the generated id. It should be of type number.
Examples:
randomID(5); // Example output: a8D3k
randomID(10); // Example output: qmOaW3si8h
License:
Released under the MIT license.