Letters are cheap, lets use more of them

This commit is contained in:
Jordan Eldredge 2019-08-06 08:01:49 -07:00
parent bde86f9d2e
commit 9dd5ccdd4e

View file

@ -148,7 +148,7 @@ function findDirectDescendantById(node, id) {
}
// Search up the tree for a node that is in `node`'s lexical scope and pred returns node
function findInLexicalScope(node, pred) {
function findInLexicalScope(node, predicate) {
let currentNode = node;
while (currentNode.parent) {
const parent = currentNode.parent;
@ -159,7 +159,7 @@ function findInLexicalScope(node, pred) {
break;
}
const item = pred(child);
const item = predicate(child);
if (item) {
return item;
}