Use 'Object.values' and 'Object.keys' to get list 'keys' and 'values'

This commit is contained in:
Hongarc 2018-12-01 08:51:03 +07:00
parent e17d974b55
commit d87fd095c0
2 changed files with 2 additions and 4 deletions

View file

@ -83,7 +83,7 @@ var Command = Backbone.Model.extend({
}, this);
var newMap = {};
_.each(options, function(args, key) {
newMap[key] = _.map(args, function(arg) {
newMap[key] = Object.values(args).map(function (arg) {
return this.replaceDotWithHead(arg);
}, this);
}, this);