rename func to callback

Co-Authored-By: Esben Sparre Andreasen <esbena@github.com>
This commit is contained in:
Erik Krogh Kristensen
2020-04-17 11:36:48 +02:00
committed by GitHub
parent eca98b42d2
commit 4f32157a78

View File

@@ -587,15 +587,15 @@ module NodeJSLib {
}
/**
* Gets a possibly promisified (using `util.promisify`) version of the input `func`.
* Gets a possibly promisified (using `util.promisify`) version of the input `callback`.
*/
DataFlow::SourceNode maybePromisified(DataFlow::SourceNode func) {
result = func
DataFlow::SourceNode maybePromisified(DataFlow::SourceNode callback) {
result = callback
or
exists(DataFlow::CallNode promisify |
promisify = DataFlow::moduleMember("util", "promisify").getACall()
|
result = promisify and promisify.getArgument(0).getALocalSource() = func
result = promisify and promisify.getArgument(0).getALocalSource() = callback
)
}