Closed jared-stilwell closed 7 years ago
Does this idiom work? (http://stackoverflow.com/a/14387057/265298)
var global = (0, eval)('this');
If it does work, let's use it (with a comment+link to that SO note), since it's slightly more succinct.
Did some anecdotal browser testing around the approach you suggested. Seems to work just as well. I'll update the PR.
For reference:
Apologies for the coverage spam. Took several laps to get the git history cleaned up.
I glanced through the README and didn't see anything about which branch PRs should be made against, however it is entirely likely I missed something. Should I edit this PR to target the master
branch instead of the released
branch?
The logic for grabbing the global object causes issues when seedrandom.js is included in minified browser payloads that explicitly use strict mode globally. Update this technique to use the function constructor which does not inherit its strictness from the caller.