/**
 * Created by CSL on 2017-06-06.
 * public functions.
 */

function deleteEmptyObject(arr) {
    function isEmptyObject(e) {
        var t;
        for (t in e)
            return !1;
        return !0
    };

    for (var i = 0; i < arr.length; i++) {
        if (isEmptyObject(arr[i])) {
            arr.splice(i, 1);
            i = i - 1;
        };
    };
};

((factory) => {
    if (typeof module !== 'undefined') {
        module.exports = factory();
    } else {
        window.commonUtil = factory();
    }
})(() => {
    function isDef(val) {
        return typeof val !== 'undefined' && val !== null;
    }

    function isEmptyVal(val) {
        return val === null || val === undefined || val === '';
    }

    return {
        isDef,
        isEmptyVal
    };
});