Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 7705edc

Browse files
docs(isNumber): add info about using isFinite to exclude NaN
Closes #11230
1 parent d02d058 commit 7705edc

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
@@ -521,6 +521,12 @@ function isString(value) {return typeof value === 'string';}
521521
* @description
522522
* Determines if a reference is a `Number`.
523523
*
524+
* This includes the "special" numbers `NaN`, `+Infinity` and `-Infinity`.
525+
*
526+
* If you wish to exclude these then you can use the native
527+
* [`isFinite'](`https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite)
528+
* method.
529+
*
524530
* @param {*} value Reference to check.
525531
* @returns {boolean} True if `value` is a `Number`.
526532
*/

0 commit comments

Comments
 (0)