CodeQL library for JavaScript

Member predicate API::Node::getAnImmediateUse

Gets an immediate use of the API component represented by this node.

For example, require('fs').readFileSync is a an immediate use of the readFileSync member from the fs module.

Unlike getAUse(), this predicate only gets the immediate references, not the indirect uses found via data flow. This means that in const x = fs.readFile only fs.readFile is a reference to the readFile member of fs, neither x nor any node that x flows to is a reference to this API component.

SourceNode getAnImmediateUse()