random-id-sqf
v1.1.3
Published
`random-id-sqf` is a tiny, high-performance JavaScript utility designed to generate random strings of any length. It is built for developers who need unique identifiers for users, sessions, or temporary tokens without the overhead of heavy libraries.
Readme
⚡ random-id-sqf: A Lightweight Random ID Generator
random-id-sqf is a tiny, high-performance JavaScript utility designed to generate random strings of any length.
It is built for developers who need unique identifiers for users, sessions, or temporary tokens without the overhead of heavy libraries.
📦 Installation
Install the package via npm:
npm install random-id-sqf⚠️ ES Module Requirement
This package uses ES Module syntax.
Make sure your package.json includes:
{
"type": "module"
}Without this setting, the import statement will throw an error.
📥 Import
import GetID from "random-id-sqf"🛠️ Usage
Generate a random ID by passing the desired length:
const id = GetID(10);
console.log(id);
// Example output: "aB3@cD!1eF"📖 Examples
GetID(5); // "a1!bC"
GetID(12); // "A!2cD@3fG!1"
GetID(20); // "r@nd0m!ch@r@ct3rs!"📚 API Reference
GetID(length)
Generates a random string of the specified length.
Returns
string— A random string containing letters, numbers, and special characters.
📝 Notes
- Includes lowercase letters, uppercase letters, numbers, and special characters like
@ ! # % & - Each function call generates a new random ID
- Works in any JavaScript environment that supports ES Modules
✨ Use Cases
- Temporary passwords
- Session tokens
- Unique user IDs
- Random keys for frontend or backend logic
🤝 Contributing
Contributions are welcome.
- Fork the repository
- Make your changes
- Submit a pull request
Please keep the code clean and follow standard best practices.
📜 License
MIT
