Files
codeql/javascript/ql/lib/semmle/javascript/heuristics/AdditionalFrameworks.qll
Andrew Eisenberg 45d1fa7f01 Packaging: Rafactor Javascript core libraries
Extract the external facing `qll` files into the codeql/javascript-all
query pack.
2021-08-25 12:15:56 -07:00

24 lines
656 B
Plaintext

/**
* Provides classes that heuristically identify uses of common frameworks.
*
* Note: This module should not be a permanent part of the standard library imports.
*/
import javascript
/**
* An import of a module whose name ends in `-lodash` or `-underscore`, interpreted
* as a likely import of the lodash or underscore library.
*/
private class ImpreciseLodashMember extends LodashUnderscore::Member {
string name;
ImpreciseLodashMember() {
exists(string lodash | this = DataFlow::moduleMember(lodash, name) |
lodash.matches("%-lodash") or lodash.matches("%-underscore")
)
}
override string getName() { result = name }
}