Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Unified Diff: tracing/tracing/base/iteration_helpers.html

Issue 2959713003: Remove tr.b.findFirstKeyInDictMatching. (Closed)
Patch Set: rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tracing/tracing/base/iteration_helpers_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/base/iteration_helpers.html
diff --git a/tracing/tracing/base/iteration_helpers.html b/tracing/tracing/base/iteration_helpers.html
index 61024437abf0538c1c67235b8cb4ac1dc42fe880..cf1a878dc56df45e44a17984d0c56face9a22fdb 100644
--- a/tracing/tracing/base/iteration_helpers.html
+++ b/tracing/tracing/base/iteration_helpers.html
@@ -269,27 +269,6 @@ tr.exportTo('tr.b', function() {
return ary[i];
}
- /**
- * Returns the key of the first dictionary entry for which |opt_func| returns
- * a truthy value.
- *
- * @param {!Object} dict The dictionary being searched.
- * @param {function(*, *): *=} opt_func The test function which accepts a
- * dictionary key as its first parameter, the corresponding dictionary
- * value as its second parameter, and returns a value that is coerced to a
- * boolean. Defaults to the identity function (which returns the key).
- * @param {*=} opt_this Optional 'this' context for opt_func.
- */
- function findFirstKeyInDictMatching(dict, opt_func, opt_this) {
- const func = opt_func || (x => x);
- for (const key in dict) {
- if (func.call(opt_this, key, dict[key])) {
- return key;
- }
- }
- return undefined;
- }
-
/** Returns the values in an ES6 Map object. */
function mapValues(map) {
const values = [];
@@ -323,7 +302,6 @@ tr.exportTo('tr.b', function() {
arrayToDict,
findFirstIndexInArray,
findFirstInArray,
- findFirstKeyInDictMatching,
mapValues,
setsEqual,
};
« no previous file with comments | « no previous file | tracing/tracing/base/iteration_helpers_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698