forked from chaijs/chai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
109 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/*! | ||
* Chai - isNaN utility | ||
* Copyright(c) 2012-2015 Sakthipriyan Vairamani <[email protected]> | ||
* MIT Licensed | ||
*/ | ||
|
||
/** | ||
* ### isNaN(value) | ||
* | ||
* Checks if the given value is NaN or not. | ||
* | ||
* utils.isNaN(NaN); // true | ||
* | ||
* @param {Value} The value which has to be checked if it is NaN | ||
* @name isNaN | ||
* @api private | ||
*/ | ||
|
||
function isNaN(value) { | ||
// Refer http://www.ecma-international.org/ecma-262/6.0/#sec-isnan-number | ||
// section's NOTE. | ||
return value !== value; | ||
} | ||
|
||
// If ECMAScript 6's Number.isNaN is present, prefer that. | ||
module.exports = Number.isNaN || isNaN; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters