{"id":15007770,"url":"https://github.com/harshdev1809/unique-login-credential","last_synced_at":"2026-01-25T12:01:21.103Z","repository":{"id":253228299,"uuid":"842870820","full_name":"HarshDev1809/unique-login-credential","owner":"HarshDev1809","description":"The Unique Login Credential Generator is an npm package that creates customizable usernames and passwords with options for length, character types, and randomization. It's designed for secure and unique user authentication.","archived":false,"fork":false,"pushed_at":"2025-06-13T19:15:41.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-25T22:55:29.849Z","etag":null,"topics":["javascript","nodejs","npm","npm-package"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/unique-login-credential","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HarshDev1809.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-15T09:22:35.000Z","updated_at":"2025-06-13T19:15:45.000Z","dependencies_parsed_at":"2024-09-28T15:21:07.580Z","dependency_job_id":"ffe6b309-a92d-427e-90e1-8814c9eb3b24","html_url":"https://github.com/HarshDev1809/unique-login-credential","commit_stats":null,"previous_names":["harshdev1809/unique-login-credential"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HarshDev1809/unique-login-credential","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarshDev1809%2Funique-login-credential","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarshDev1809%2Funique-login-credential/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarshDev1809%2Funique-login-credential/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarshDev1809%2Funique-login-credential/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HarshDev1809","download_url":"https://codeload.github.com/HarshDev1809/unique-login-credential/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarshDev1809%2Funique-login-credential/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28752671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T10:25:12.305Z","status":"ssl_error","status_checked_at":"2026-01-25T10:25:11.933Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","nodejs","npm","npm-package"],"created_at":"2024-09-24T19:13:41.534Z","updated_at":"2026-01-25T12:01:21.070Z","avatar_url":"https://github.com/HarshDev1809.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unique Login Credential\n\n`unique-login-credential` is a versatile Node.js package for generating secure and customizable passwords and usernames. It offers flexible options to tailor credentials to your needs, making it ideal for applications requiring unique login credentials. The package supports both ES6 modules and CommonJS, with no need for `.default` in ES module imports, and includes full TypeScript support with type definitions.\n\n## Features\n\n- **Customizable Password Generation**: Define password length and composition, including capital letters, small letters, numbers, and special characters.\n- **Flexible Username Generation**: Add prefixes and customize character composition for usernames.\n- **TypeScript Support**: Fully typed with included TypeScript declarations for seamless integration.\n- **ES6 and CommonJS Support**: Compatible with `import` and `require` module systems.\n- **Randomization Option**: Shuffle characters for added security and uniqueness.\n\n## Installation\n\nInstall the package via npm:\n\n```bash\nnpm install unique-login-credential\n```\n\n## Usage\n\n### ES Modules\n\nFor projects using ES modules, import the functions directly:\n\n```javascript\nimport { uniquePassword, uniqueUsername } from 'unique-login-credential';\n\n// Generate a password\nconst password = uniquePassword({\n  length: 12,\n  capitalLetter: 2,\n  smallLetter: 4,\n  number: 3,\n  specialCharacter: 2,\n  random: true\n});\nconsole.log(`Generated Password: ${password}`);\n\n// Generate a username\nconst username = uniqueUsername({\n  prefix: 'user_',\n  length: 10,\n  capitalLetter: 2,\n  smallLetter: 5,\n  number: 2,\n  specialCharacter: 1,\n  random: true\n});\nconsole.log(`Generated Username: ${username}`);\n```\n\n### CommonJS\n\nFor CommonJS projects, use `require`:\n\n```javascript\nconst { uniquePassword, uniqueUsername } = require('unique-login-credential');\n\n// Generate a password\nconst password = uniquePassword({\n  length: 12,\n  capitalLetter: 2,\n  smallLetter: 4,\n  number: 3,\n  specialCharacter: 2,\n  random: true\n});\nconsole.log(`Generated Password: ${password}`);\n\n// Generate a username\nconst username = uniqueUsername({\n  prefix: 'user_',\n  length: 10,\n  capitalLetter: 2,\n  smallLetter: 5,\n  number: 2,\n  specialCharacter: 1,\n  random: true\n});\nconsole.log(`Generated Username: ${username}`);\n```\n\n### TypeScript\n\nThe package includes TypeScript type definitions. Use it in TypeScript projects as follows:\n\n```typescript\nimport { uniquePassword, uniqueUsername } from 'unique-login-credential';\n\n// Generate a password\nconst password = uniquePassword({\n  length: 12,\n  capitalLetter: 2,\n  smallLetter: 4,\n  number: 3,\n  specialCharacter: 2,\n  random: true\n});\nconsole.log(`Generated Password: ${password}`);\n\n// Generate a username\nconst username = uniqueUsername({\n  prefix: 'user_',\n  length: 10,\n  capitalLetter: 2,\n  smallLetter: 5,\n  number: 2,\n  specialCharacter: 1,\n  random: true\n});\nconsole.log(`Generated Username: ${username}`);\n```\n\n## Functions\n\n### `uniquePassword(options)`\n\nGenerates a secure password based on the provided options.\n\n**Parameters:**\n\n- `options`: An object with the following properties:\n  - `length` (number): Total length of the password. Must be at least the sum of `capitalLetter`, `smallLetter`, `number`, and `specialCharacter`. **Default:** 8\n  - `capitalLetter` (number): Number of capital letters to include. **Default:** 1\n  - `smallLetter` (number): Number of lowercase letters to include. **Default:** 3\n  - `number` (number): Number of numeric digits to include. **Default:** 2\n  - `specialCharacter` (number): Number of special characters to include. **Default:** 2\n  - `random` (boolean): Whether to shuffle the characters randomly. **Default:** false\n\n**Returns:** A string representing the generated password.\n\n**Example:**\n\n```typescript\nconst password = uniquePassword({\n  length: 12,\n  capitalLetter: 2,\n  smallLetter: 4,\n  number: 3,\n  specialCharacter: 2,\n  random: true\n});\nconsole.log(password); // Example output: \"A1b@C2d!Ef3G\"\n```\n\n### `uniqueUsername(options)`\n\nGenerates a unique username based on the provided options.\n\n**Parameters:**\n\n- `options`: An object with the following properties:\n  - `prefix` (string): A prefix to prepend to the username. **Default:** \"\"\n  - `length` (number): Total length of the username, including the prefix. Must be at least the sum of `capitalLetter`, `smallLetter`, `number`, `specialCharacter`, and the prefix length. **Default:** 6\n  - `capitalLetter` (number): Number of capital letters to include. **Default:** 1\n  - `smallLetter` (number): Number of lowercase letters to include. **Default:** 3\n  - `number` (number): Number of numeric digits to include. **Default:** 2\n  - `specialCharacter` (number): Number of special characters to include. **Default:** 0\n  - `random` (boolean): Whether to shuffle the characters randomly. **Default:** false\n\n**Returns:** A string representing the generated username.\n\n**Example:**\n\n```typescript\nconst username = uniqueUsername({\n  prefix: 'user_',\n  length: 10,\n  capitalLetter: 2,\n  smallLetter: 5,\n  number: 2,\n  specialCharacter: 1,\n  random: true\n});\nconsole.log(username); // Example output: \"user_a1B2cD@\"\n```\n\n## Dependencies\n\n- Node.js \u003e= 12.x\n- TypeScript \u003e= 4.x (optional, for TypeScript users)\n\n## Contributing\n\nContributions are welcome! To contribute:\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature/your-feature`).\n3. Commit your changes (`git commit -m 'Add your feature'`).\n4. Push to the branch (`git push origin feature/your-feature`).\n5. Open a Pull Request describing your changes.\n\nPlease ensure your code adheres to the project's coding standards and includes tests where applicable.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor questions or support, open an issue on the [GitHub repository](https://github.com/HarshDev1809/unique-login-credential/issues) or contact the maintainer at [dev182000@gmail.com](mailto:dev182000@gmail.com).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshdev1809%2Funique-login-credential","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharshdev1809%2Funique-login-credential","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshdev1809%2Funique-login-credential/lists"}