src/utilities.js
/**
* helper function to remove values in a map
* @param {Object} map
* @param {string} key
* @param {*} value
* @private
*/
helper function to remove values in a map
helper function to remove values in a map
function unsetter(map, key, value) {
    if(__.isNotUndef(map[key])) {
        if(__.isArr(map[key])) {
            map[key] = map[key].filter(function(val){
                return value !== val;
            });
            if(map[key].length===0) {
                delete map[key];
            }
        } else {
            delete map[key];
        }
    }
}
function unsetter ( map , key , value ) { if ( __ . isNotUndef ( map [ key ] ) ) { if ( __ . isArr ( map [ key ] ) ) { map [ key ] = map [ key ] . filter ( function ( val ) { return value !== val ; } ) ; if ( map [ key ] . length === 0 ) { delete map [ key ] ; } } else { delete map [ key ] ; } } }
helper function to remove values in a map
helper function to remove values in a map