CodeQL library for JavaScript
Search

Member predicate API::Node::getARhs

Gets a data-flow node corresponding to the right-hand side of a definition of the API component represented by this node.

For example, in the assignment exports.plusOne = (x) => x+1, the function expression (x) => x+1 is the right-hand side of the definition of the member plusOne of the enclosing module, and the expression x+1 is the right-had side of the definition of its result.

Note that for parameters, it is the arguments flowing into that parameter that count as right-hand sides of the definition, not the declaration of the parameter itself. Consequently, in require('fs').readFileSync(file), file is the right-hand side of a definition of the first parameter of readFileSync from the fs module.

Node getARhs()