src/js/common/util.js
function(obj) {
        var pruned = {};
        _.each(obj, function(value, key) {
            if (!_.isUndefined(value) && !_.isNull(value)) {
                pruned[key] = value;
            }
        });

        return pruned;
    }
function(obj) {
        var pruned = {};
        _.each(obj, function(value, key) {
            if (!_.isUndefined(value) && !_.isNull(value)) {
                pruned[key] = value;
            }
        });

        return pruned;
    }
function ( obj ) { var pruned = { } ; _ . each ( obj , function ( value , key ) { if ( ! _ . isUndefined ( value ) && ! _ . isNull ( value ) ) { pruned [ key ] = value ; } } ) ; return pruned ; }
Omits all undefined or null properties of given object.
@param {Object} obj - object
@returns {Object}
Omits all undefined or null properties of given object .