isSafeInteger
See original GitHub issueDetermines whether the provided value is a number that is a safe integer.
Complete description of what safe integer is, can be found here on MDN. The linked page also contains polyfill and preferred implementation of the isSafeInteger
function. Modern javascript already contains function Number.isSafeInteger
.
Expected behavior
RA.isSafeInteger(3); // true
RA.isSafeInteger(Math.pow(2, 53)); // false
RA.isSafeInteger(Math.pow(2, 53) - 1); // true
RA.isSafeInteger(NaN); // false
RA.isSafeInteger(Infinity); // false
RA.isSafeInteger('3'); // false
RA.isSafeInteger(3.1); // false
RA.isSafeInteger(3.0); // true
This PR should serve as a model template of PR for isSafeInteger
function.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Number.isSafeInteger() - JavaScript - MDN Web Docs
The Number.isSafeInteger() method determines whether the provided value is a number that is a safe integer.
Read more >JavaScript Number isSafeInteger() Method
Definition and Usage. The Number.isSafeInteger() method returns true if a number is a safe integer. Otherwise it returns false .
Read more >JavaScript: Number isSafeInteger() method
In JavaScript, isSafeInteger() is a Number method that is used to return a Boolean value indicating whether a value is a safe integer....
Read more >JavaScript Number isSafeInteger() Method
The isSafeInteger() method in JavaScript is used to check whether a number is a safe integer or not. Syntax: Number.isSafeInteger(Value).
Read more >What is isSafeInteger() in Javascript?
isSafeInteger () is a Number method that is used to determine if a given value is a safe integer. A safe integer is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@rostyslav-diakiv do step in 😉
@char0n If you don’t mind I can step in)