question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discussion: Disallow global `isFinite`

See original GitHub issue

The global isFinite function casts the value passed to it and evaluates arbitrary values as finite. What are thoughts on disabling the global isFinite in favor of Number.isFinite

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:17

github_iconTop GitHub Comments

5reactions
minbelappscommented, May 8, 2018

Global isFinite is not the same as Number.isFinite. Se documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite

so @amilajack and @ljharb , why did you disable global isFinite in favor of Number.isFinite as they are not the same functions? And actually they acts very different.

4reactions
ljharbcommented, May 8, 2018

The easy way is rarely the best way. If you’re doing multiple things - converting to a number + checking something about the number - you should do it in multiple steps. Explicit is better than implicit.

Read more comments on GitHub >

github_iconTop Results From Across the Web

isFinite() - JavaScript - MDN Web Docs - Mozilla
The global isFinite() function determines whether the passed value is a finite number. If needed, the parameter is first converted to a number....
Read more >
Javascript isFinite() Example | isFinite() Function In Javascript
The global isFinite() function converts a tested value to the Number, then tests it. Number.isFinite() does not transform the values to the Number, ......
Read more >
JavaScript In Depth - isFinite & IsNaN Functions
isFinite function determines if the passed argument is finite value. It checks if its argument is not NaN , or negative infinity or...
Read more >
Resolve blocking problem caused by lock escalation - SQL ...
This article describes how to determine whether lock escalation is causing blocking and how to resolve the problem.
Read more >
The influence of large-scale wind power on global climate
These values were chosen to represent an array of wind turbines, 2.8 turbines per km 2, each with 100-m-diameter rotors and 100-m hub...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found