refactor: drop usage of _.mapValues

This commit is contained in:
Justin Beckwith 2018-11-15 16:43:33 -08:00
parent 17e72173dc
commit bba0644db5
1 changed files with 4 additions and 3 deletions

View File

@ -980,9 +980,10 @@ exports.getClientChannel = function(client) {
* @returns {Object.<string, Interceptor[]>}
*/
exports.getClientInterceptors = function(client) {
return _.mapValues(client.$method_definitions, function(def, name) {
return client[name].interceptors;
});
return Object.keys(client.$method_definitions)
.reduce((acc, key) => {
acc[key] = client[key].interceptors;
}, {});
};
/**