Closed michaelrhodes closed 6 years ago
It might also be worth exporting require('math-random').cryptographic
so that older browsers can easily check which type of random function is being used
I think this looks great. I think adding the .cryptographic
property is a good idea to give browser app implementors the choice on if they want to support older browsers.
Agreed. I’ll update the pull request? And if so, what’s your preferred property name? Is cryptographic
fine, or should I go for something more descriptive like isCryptographicallySecure
or isSecure
?
I think .isCrypto
is good.
Also, add some documentation to .verb.md that explains what it means. I think it's fine to say something like, "isCrypto
will be true
when a cryptographic library is being used, otherwise, Math.random
is being used."
I think .isCrypto is good.
Agreed, I think isCrypto
makes sense since it's a boolean confirming that the built-in crypto
lib was used.
Nice work, thanks!
Okie dokie gang, I believe this is good to go now :)
Edit: That said, I was a bit unsure where to fit the documentation into .verb.md
, so I just did what made sense to me. Let me know if you think it should be under its own heading.
thanks! published and released as 3.0.0!
Cheers @michaelrhodes & @jonschlinkert
Closes #4