{"_id":"@anisafifi/otp-pass-kit","_rev":"4-86114129c3319c0fd3edf90e9a2a08f3","name":"@anisafifi/otp-pass-kit","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@anisafifi/otp-pass-kit","version":"0.0.1","keywords":["OTP","password","Generator"],"author":{"name":"Anis Afifi"},"license":"MIT","_id":"@anisafifi/otp-pass-kit@0.0.1","maintainers":[{"name":"anisafifi","email":"anis@afifi.pro"}],"homepage":"https://github.com/anisafifi/otp-pass-kit","bugs":{"url":"https://github.com/anisafifi/otp-pass-kit/issues"},"dist":{"shasum":"96814acb9a651d4cfa715d84d267b85a54d6cf8f","tarball":"https://registry.npmjs.org/@anisafifi/otp-pass-kit/-/otp-pass-kit-0.0.1.tgz","fileCount":8,"integrity":"sha512-CPgJ3Y18tASx89O91fXWO3kV5VDtnUgLqJh9MyUoeJmHFdUfOVVC62mk3Y30Ts1iSis6xBTzblwUg0Lo4yPZ3Q==","signatures":[{"sig":"MEUCIQCno70+a/DR7Mwhe9RBtTrkPoCXc7YRzGdw4mMyAqeXsQIgbbASOt386HfZLuDCV2e+w8CNvNPGidp5JYzgb2BeKA8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10158},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","gitHead":"d6f0c0b2abb931887dbb92ea1b1d12f87039e75d","scripts":{"build":"tsup"},"_npmUser":{"name":"anisafifi","email":"anis@afifi.pro"},"repository":{"url":"git+https://github.com/anisafifi/otp-pass-kit.git"},"_npmVersion":"10.9.2","description":"A package that will generate secure and safe OTP and password seamlessly","directories":{},"_nodeVersion":"22.13.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","typescript":"^5.7.3"},"_npmOperationalInternal":{"tmp":"tmp/otp-pass-kit_0.0.1_1738256514390_0.07295352519848852","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@anisafifi/otp-pass-kit","version":"0.0.2","keywords":["OTP","password","Generator"],"author":{"name":"Anis Afifi"},"license":"MIT","_id":"@anisafifi/otp-pass-kit@0.0.2","maintainers":[{"name":"anisafifi","email":"anis@afifi.pro"}],"homepage":"https://codewithafifi.com/tools/otp-pass-kit/","dist":{"shasum":"a7406e4c83fbcc42cefa12ea6991ff889dc06fab","tarball":"https://registry.npmjs.org/@anisafifi/otp-pass-kit/-/otp-pass-kit-0.0.2.tgz","fileCount":7,"integrity":"sha512-uqutemzFYJ6Y8j/F74lnuMab3cD7VH220qgOKwBZgbfRoLxtX4Q0ELbNcL0VZ1pBXsnYN0tBJdttzCfrVC0zYg==","signatures":[{"sig":"MEUCIQCcbMGFjOm4GBCRF/pdSzgfCp/c+5O+Awzp38xziBZ2EwIgEMIU0UINl2Tmv77bGZPk4Jtf/tmmxSGqEH/eEHJXDU8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9241},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","gitHead":"83c455ce80783230cf664121c4bfc98e2db8846f","scripts":{"build":"tsup"},"_npmUser":{"name":"anisafifi","email":"anis@afifi.pro"},"_npmVersion":"10.8.2","description":"A package that will generate secure and safe OTP and password seamlessly","directories":{},"_nodeVersion":"20.18.2","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","typescript":"^5.7.3"},"_npmOperationalInternal":{"tmp":"tmp/otp-pass-kit_0.0.2_1738285231209_0.37213319897724073","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-01-30T17:01:54.266Z","modified":"2025-11-22T05:51:35.245Z","0.0.1":"2025-01-30T17:01:54.592Z","0.0.2":"2025-01-31T01:00:31.380Z"},"author":{"name":"Anis Afifi"},"license":"MIT","homepage":"https://codewithafifi.com/tools/otp-pass-kit/","keywords":["OTP","password","Generator"],"description":"A package that will generate secure and safe OTP and password seamlessly","maintainers":[{"email":"anis@anisafifi.com","name":"anisafifi"}],"readme":"# OTP & Password Generator\n\nA simple and customizable OTP and password generator for Node.js and TypeScript projects.\n\n## Installation\n\n```sh\nnpm install @anisafifi/otp-pass-kit\n```\n\n## Importing the Module\n\n```ts\nimport { generateOtp, generatePass } from \"@anisafifi/otp-pass-kit\";\n```\n\n## OTP Generator\n\n### Function Signature\n\n```ts\nfunction generateOtp(length?: number, options?: OtpOptions): string;\n```\n\n### Options\n\n| Option              | Type    | Default | Description                         |\n|--------------------|--------|---------|-------------------------------------|\n| `upperCaseAlphabets` | boolean | `false` | Include uppercase letters          |\n| `lowerCaseAlphabets` | boolean | `false` | Include lowercase letters          |\n| `specialChars`       | boolean | `false` | Include special characters         |\n| `digits`            | boolean | `true`  | Include digits                      |\n\n### Example Usage\n\n```ts\nimport { generateOtp } from \"@anisafifi/otp-pass-kit\";\n\nconst otp1 = generateOtp(); // Default 6-digit numeric OTP\nconsole.log(otp1);\n\nconst otp2 = generateOtp(8, { upperCaseAlphabets: true, digits: true }); // 8-character OTP with digits and uppercase letters\nconsole.log(otp2);\n```\n\n## Password Generator\n\n### Function Signature\n\n```ts\nfunction generatePass(length?: number, options?: passOptions): string;\n```\n\n### Options\n\n| Option              | Type    | Default | Description                         |\n|--------------------|--------|---------|-------------------------------------|\n| `upperCaseAlphabets` | boolean | `true`  | Include uppercase letters          |\n| `lowerCaseAlphabets` | boolean | `true`  | Include lowercase letters          |\n| `specialChars`       | boolean | `true`  | Include special characters         |\n| `digits`            | boolean | `true`  | Include digits                      |\n\n### Example Usage\n\n```ts\nimport { generatePass } from \"@anisafifi/otp-pass-kit\";\n\nconst password1 = generatePass(); // Default 8-character password with all character sets\nconsole.log(password1);\n\nconst password2 = generatePass(12, { lowerCaseAlphabets: true, digits: true }); // 12-character password with lowercase letters and digits\nconsole.log(password2);\n```\n\n## Error Handling\n\nIf no character set is selected in the options, an error is thrown:\n\n```ts\ntry {\n  generateOtp(6, { upperCaseAlphabets: false, lowerCaseAlphabets: false, specialChars: false, digits: false });\n} catch (error) {\n  console.error(error.message); // \"At least one character set must be enabled\"\n}\n```\n\n## License\n\nThis package is licensed under the MIT License.","readmeFilename":"readme.md"}