Predicate isReadFrom
Holds if the “name” of read
matches regexp
.
The “name” is one of:
- the name of the read variable, if
read
is a variable read - the name of the read property, if
read
is property read - the suffix of the getter-method name, if
read
is an invocation, for example “Number” in “getNumber”
Import path
import semmle.javascript.heuristics.SyntacticHeuristics
predicate isReadFrom(Node read, string regexp)