Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Add browser support #6

Merged
merged 1 commit into from
Apr 9, 2016
Merged

Add browser support #6

merged 1 commit into from
Apr 9, 2016

Conversation

pwnall
Copy link
Contributor

@pwnall pwnall commented Apr 6, 2016

No description provided.

@coveralls
Copy link

Coverage Status

Coverage decreased (-4.3%) to 82.171% when pulling 95a87c1 on pwnall:browser into 7b39f95 on heap:master.

@pwnall
Copy link
Contributor Author

pwnall commented Apr 6, 2016

Coverage decreased because of the browser-specific code. ¯_(ツ)_/¯

code();
var benchmark = null;

if (typeof(process) !== "undefined" && typeof(process.hrtime) === "function") {
Copy link
Contributor

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

Copy link
Contributor Author

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 😢

Copy link
Contributor Author

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!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pwnall
Copy link
Contributor Author

pwnall commented Apr 6, 2016

I addressed the feedback and extended the README with browser testing instructions. PTAL.

@coveralls
Copy link

Coverage Status

Coverage decreased (-4.3%) to 82.171% when pulling 453cb92 on pwnall:browser into 7b39f95 on heap:master.

@pwnall
Copy link
Contributor Author

pwnall commented Apr 9, 2016

@jeffling ping? Can you please take another look at this?

@jeffling jeffling merged commit 9da0338 into heap-legacy:master Apr 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants