Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce8be9c

Browse files
docs(isNumber): add info about using isFinite to exclude NaN
Closes angular#11230
1 parent b3878a3 commit ce8be9c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Angular.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,12 @@ function isString(value) {return typeof value === 'string';}
482482
* @description
483483
* Determines if a reference is a `Number`.
484484
*
485+
* This includes the "special" numbers `NaN`, `+Infinity` and `-Infinity`.
486+
*
487+
* If you wish to exclude these then you can use the native
488+
* [`isFinite'](`https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite)
489+
* method.
490+
*
485491
* @param {*} value Reference to check.
486492
* @returns {boolean} True if `value` is a `Number`.
487493
*/

0 commit comments

Comments
 (0)