Code coverage report for lang/isNaN.js

Statements: 100% (5 / 5)      Branches: 100% (2 / 2)      Functions: 100% (3 / 3)      Lines: 100% (4 / 4)     

All files » lang/ » isNaN.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 171           1       15     1      
define(['./isNumber'], function (isNumber) {
 
    /**
     * Check if value is NaN for realz
     * @version 0.1.2 (2012/11/28)
     */
    function isNaN(val){
        // based on the fact that NaN !== NaN
        // need to check if it's a number to avoid conflicts with host objects
        // also need to coerce ToNumber to avoid edge case `new Number(NaN)`
        return isNumber(val) && val != +val;
    }
 
    return isNaN;
 
});