1.0.8 • Published 11 months ago

string-generate v1.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

string-generate

A versatile TypeScript/JavaScript library for generating random strings with customizable options.

Installation

Install the package using using npm :

npm install string-generate

Usage

First, import the string-generate function from the package:

import { generate } from "string-generate";

console.log(generate());
// Default 32-character alphanumeric string

console.log(generate(7));
// 7-character alphanumeric string

console.log(generate({ length: 12, charset: "alphabetic" }));
// 12-character alphabetic string
// or use these charset| "alphanumeric" | "numeric" | "!@#$%^&*()" | "hex"

console.log(generate({ charset: "abc" }));
// 32-character string using only 'a', 'b', and 'c'

console.log(generate({ charset: ["numeric", "!"] }));
// 32-character string using numbers and '!'

generate({ charset: "abc" }, (result) => {
  console.log(result);
});
// Callback

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

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

Support

If you encounter any issues or have questions, please file an issue on the GitHub repository.

Changelog

1.0.8

  • Initial release
  • Basic string generation functionality
  • Customizable options for character types and exclusions

Made with ❤️ by Muhammad Sameer

1.0.8

11 months ago

1.0.7

11 months ago

1.0.5

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.6

11 months ago