otp-generator
otp-generator copied to clipboard
One Time Password generator
When I get a string of 6 digits and 1st character is 0, the actual number becomes 5 digits. This should not happen. Can we add a check that the...
@Maheshkumar-Kakade Please check. I've replaced the old while loop with a higher order one liner function. return [...Array(length).keys()].map(_ => allowsChars[crypto.randomInt(0, allowsChars.length)]).join('') All the test cases have passed. Thank you
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. Commits 7efb22a 1.2.6 ef88b93 security notice for additional prototype pollution issue c2b9819 isConstructorOrProto adapted from PR bc8ecee test from prototype pollution PR See full...
- Simplify the [checking of properties](https://github.com/Maheshkumar-Kakade/otp-generator/blob/master/index.js#L25C1-L28C135) in `generateOptions`. - Remove extra check: I guess checking if `generateOptions.digits === true` [here](https://github.com/Maheshkumar-Kakade/otp-generator/blob/d9a5774e446242bc27f0ba88d1428fb7db685176/index.js#L37) is unecessary (it will always be true if the selected...