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