lib/field.filter.js
function removeItemsFromList(list, itemsToRemove) {
    var result = [];

    _.each(list, function (item) {
        var valid = true;
        for (var i = 0; i < itemsToRemove.length; i++) {

            // if the item match one of the items to remove don't includ it in the result list
            if (item.indexOf(itemsToRemove[i]) === 0) {
                valid = false;
                break;
            }
        }

        if (valid) {
            result.push(item);
        }
    });

    return result;
}
function removeItemsFromList(list, itemsToRemove) {
    var result = [];

    _.each(list, function (item) {
        var valid = true;
        for (var i = 0; i < itemsToRemove.length; i++) {

            // if the item match one of the items to remove don't includ it in the result list
            if (item.indexOf(itemsToRemove[i]) === 0) {
                valid = false;
                break;
            }
        }

        if (valid) {
            result.push(item);
        }
    });

    return result;
}
function removeItemsFromList ( list , itemsToRemove ) { var result = [ ] ; _ . each ( list , function ( item ) { var valid = true ; for ( var i = 0 ; i < itemsToRemove . length ; i ++ ) { // if the item match one of the items to remove don't includ it in the result list if ( item . indexOf ( itemsToRemove [ i ] ) === 0 ) { valid = false ; break ; } } if ( valid ) { result . push ( item ) ; } } ) ; return result ; }
Remove items from a list
@param list
@param itemsToRemove
@returns {Array}
Remove items from a list