Use 'Object.values' and 'Object.keys' instead of '_.each(object)'

This commit is contained in:
Hongarc 2018-12-01 12:33:23 +07:00
parent bd8009386d
commit 96ddb5041a
9 changed files with 52 additions and 33 deletions

View file

@ -839,9 +839,10 @@ var instantCommands = [
var commands = require('../commands').commands.getOptionMap()['git'];
// build up a nice display of what we support
_.each(commands, function(commandOptions, command) {
Object.keys(commands).forEach(function(command) {
var commandOptions = commands[command];
lines.push('git ' + command);
_.each(commandOptions, function(vals, optionName) {
Object.keys(commandOptions).forEach(function(optionName) {
lines.push('\t ' + optionName);
}, this);
}, this);