Code coverage report for lang/isEmpty.js

Statements: 88.89% (8 / 9)      Branches: 83.33% (5 / 6)      Functions: 100% (3 / 3)      Lines: 87.5% (7 / 8)     

All files » lang/ » isEmpty.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 161   1 10 2 8   8         1      
define(['../object/size'], function (size) {
 
    function isEmpty(val){
        if ( typeof val === 'string' ) {
            return val === '';
        } else Eif ( typeof val === 'object' || typeof val === 'function' ) {
            // array is also an object and object/size works fine
            return size(val) === 0;
        }
        return false;
    }
 
    return isEmpty;
 
});