Skip to content

Commit fd10b2f

Browse files
committed
.keys -> Object.keys
1 parent bb8e378 commit fd10b2f

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

modules/tests-ui/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ function findUsedMethods(options, debugData, result) {
500500

501501
if (options.findByData) {
502502
try {
503-
good = _.intersection(_.keys(l), options.findByData).length > 0;
503+
good = _.intersection(Object.keys(l), options.findByData).length > 0;
504504
} catch(ex) {
505505
good = false;
506506
}

modules/tests-ui/views.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
}
9898
}
9999

100-
var testedUrls = _.keys(pluginTest.last_page_logs_dict);
100+
var testedUrls = Object.keys(pluginTest.last_page_logs_dict);
101101

102102
var logs = _.values(pluginTest.last_page_logs_dict);
103103

@@ -134,7 +134,7 @@
134134
good.items = pluginTests.filter(function(p) { return !p.hasError; });
135135
bad.items = pluginTests.filter(function(p) { return p.hasError; });
136136

137-
_.keys(stats).forEach(function(key) {
137+
Object.keys(stats).forEach(function(key) {
138138
averageTime[key] = Math.round(totalTime[key] / (totalCount[key] || 1));
139139
averageOkTime[key] = Math.round(totalOkTime[key] / (totalOkCount[key] || 1));
140140
});
@@ -147,7 +147,7 @@
147147
totalCount: totalCount,
148148
averageOkTime: averageOkTime,
149149
totalOkCount: totalOkCount,
150-
statsKeys: _.keys(stats),
150+
statsKeys: Object.keys(stats),
151151
format: function(d) {
152152
if (!d) {
153153
return "–";
@@ -157,4 +157,4 @@
157157
});
158158
});
159159
});
160-
}
160+
}

static/js/debug.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ function showEmbeds($embeds, data, filterByRel) {
241241
.addClass("table table-bordered")
242242
.append('<thead><tr>' + (DEBUG ? '<th>plugin</th><th>requirements</th>' : '') + '<th>key</th><th>value</th></tr></thead>');
243243

244-
var metaKeys = _.keys(data.meta);
244+
var metaKeys = Object.keys(data.meta);
245245
metaKeys.sort();
246246
metaKeys.forEach(function(key) {
247247
if (key == "_sources") {
@@ -259,7 +259,7 @@ function showEmbeds($embeds, data, filterByRel) {
259259
$embeds.prepend($meta);
260260
$embeds.prepend('<h4>Unified meta</h4>');
261261

262-
var pluginsList = _.keys(usedPlugins);
262+
var pluginsList = Object.keys(usedPlugins);
263263
var $textarea = $('<textarea>')
264264
.hide()
265265
.attr('rows', pluginsList.length + 2)

utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122

123123
var newQuery = {};
124124

125-
var keys = _.keys(query);
125+
var keys = Object.keys(query);
126126
keys.sort();
127127
keys.forEach(function(key) {
128128
newQuery[key] = query[key];

0 commit comments

Comments
 (0)