Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isNaN and isFinite on window #271

Closed
Calvein opened this issue Sep 22, 2015 · 2 comments

Comments

@Calvein
Copy link

commented Sep 22, 2015

I'm quoting the readme:

Always prefix browser globals with window – except document and navigator are okay

I mostly agree with it except for those 2 because they're not really tied to the window (and they are slightly different from Number.isNaN/Finite).

@dcousens

This comment has been minimized.

Copy link
Member

commented Sep 22, 2015

Standard doesn't require isFinite and isNaN to be prefixed with window AFAIK.
Sounds like the README isn't correct.

@dcousens dcousens added the question label Sep 22, 2015

@feross

This comment has been minimized.

Copy link
Member

commented Sep 22, 2015

isNaN is not a global that's unique to the browser. It's available in all JS environments. So you're free to use it without prefixing it with window.

@feross feross closed this Sep 22, 2015

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants
You can’t perform that action at this time.