function filterByKeys(inputObject, keep) {
    if (!Array.isArray(keep) || keep.length === 0) {
        return inputObject;
    }
    var result = {};
    for (var i = 0, len = keep.length; i < len; i++) {
        var key = keep[i];
        if (inputObject.hasOwnProperty(key)) {
            result[key] = inputObject[key];
        }
    }
    return result;
}
/**
 * filters an object by keys
 *
 * @param inputObject   the input object
 * @param keep          an array of strings (keys) to keep
 * @returns             the filtered object
 */
filters an object by keys
@param inputObject   the input object
@param keep          an array of strings (keys) to keep
@returns             the filtered object
filters an object by keys @param inputObject the input object @param keep an array of strings ( keys ) to keep @returns the filtered object
function filterByKeys(inputObject, keep) {
    if (!Array.isArray(keep) || keep.length === 0) {
        return inputObject;
    }
    var result = {};
    for (var i = 0, len = keep.length; i < len; i++) {
        var key = keep[i];
        if (inputObject.hasOwnProperty(key)) {
            result[key] = inputObject[key];
        }
    }
    return result;
}
function filterByKeys ( inputObject , keep ) { if ( ! Array . isArray ( keep ) || keep . length === 0 ) { return inputObject ; } var result = { } ; for ( var i = 0 , len = keep . length ; i < len ; i ++ ) { var key = keep [ i ] ; if ( inputObject . hasOwnProperty ( key ) ) { result [ key ] = inputObject [ key ] ; } } return result ; }
filters an object by keys
 @param inputObject   the input object
 @param keep          an array of strings (keys) to keep
 @returns             the filtered object
filters an object by keys @param inputObject the input object @param keep an array of strings ( keys ) to keep @returns the filtered object