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

Predicate isAssignedTo

Holds if rhs is assigned to a “name” that matches regexp.

The “name” is one of:

  • the name of the written variable, if rhs is the right hand side of a variable write
  • the name of the written property, if rhs is the right hand side of a property write

Import path

import semmle.javascript.heuristics.SyntacticHeuristics
predicate isAssignedTo(Node rhs, string regexp)