CodeQL library for JavaScript/TypeScript
codeql/javascript-all 0.8.12 (changelog, source)
Search

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)