msngr.js
function (type, item) {
        switch(type) {
            case simpleTypes.undefined:
            case simpleTypes.null:
                return true;
            case simpleTypes.string:
                if (item.trim().length === 0) {
                    return true;
                }
                return false;
            case simpleTypes.object:
                return (Object.keys(item).length === 0);
            case simpleTypes.array:
                return (item.length === 0);
            default:
                return false;
        };
    }
function (type, item) {
        switch(type) {
            case simpleTypes.undefined:
            case simpleTypes.null:
                return true;
            case simpleTypes.string:
                if (item.trim().length === 0) {
                    return true;
                }
                return false;
            case simpleTypes.object:
                return (Object.keys(item).length === 0);
            case simpleTypes.array:
                return (item.length === 0);
            default:
                return false;
        };
    }
function ( type , item ) { switch ( type ) { case simpleTypes . undefined : case simpleTypes . null : return true ; case simpleTypes . string : if ( item . trim ( ) . length === 0 ) { return true ; } return false ; case simpleTypes . object : return ( Object . keys ( item ) . length === 0 ) ; case simpleTypes . array : return ( item . length === 0 ) ; default : return false ; } ; }
Check an object for empiness
Check an object for empiness