@devtea2025/dolor-porro-vitae-sunt

1.0.0 • Public • Published

Random String Generator

npm version license

The @devtea2025/dolor-porro-vitae-sunt is a lightweight utility library for generating random strings in Node.js or browser environments. It provides a simple function for creating strings with a specified length, using a customizable character set.

Installation

Install the library using npm:

npm install @devtea2025/dolor-porro-vitae-sunt

Usage

The randomStringGenerator function exports a single method that can be used to generate random strings.

const { generateRandomString } = require('random-string-generator');

// Generate a random string of length 10
const randomString = generateRandomString(10);
console.log(randomString);

API

generateRandomString(length: number): string

Generates a random string of the specified length using a default character set of uppercase letters, lowercase letters, and digits.

  • Parameters:
    • length: The length of the generated random string.
  • Returns:
    • A randomly generated string.

Examples:

const { generateRandomString } = require('random-string-generator');

// Generate a random string of length 8
const randomString1 = generateRandomString(8);
console.log(randomString1);  // Output: "Yh8d3g9n"

// Generate another random string of length 5
const randomString2 = generateRandomString(5);
console.log(randomString2);  // Output: "Ap1i9"

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Feel free to contribute, report issues, or suggest improvements. Contributions are welcome!

Contact

For any inquiries or collaboration opportunities, feel free to reach out:

/@devtea2025/dolor-porro-vitae-sunt/

    Package Sidebar

    Install

    npm i @devtea2025/dolor-porro-vitae-sunt

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    4.74 kB

    Total Files

    5

    Last publish

    Collaborators

    • tranvuchinh5538