-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
Coverage decreased because of the browser-specific code. ¯_(ツ)_/¯ |
code(); | ||
var benchmark = null; | ||
|
||
if (typeof(process) !== "undefined" && typeof(process.hrtime) === "function") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i like doing typeof((process || {}).hrtime) === "function"
as it's more declarative, but consider this a non-blocking nit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But process
isn't defined in the browser, so this would crash 😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can use this pattern to simplify the CSPRNG engine detection though. Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used the pattern that you suggested here:
https://github.com/heap/cryptohat/pull/6/files#diff-168726dbe96b3ce427e7fedce31bb0bcR93
I addressed the feedback and extended the README with browser testing instructions. PTAL. |
@jeffling ping? Can you please take another look at this? |
No description provided.