Files
codeql/javascript/ql/test/library-tests/NodeJS/RequireImport.ql
2018-11-29 09:52:31 +00:00

7 lines
232 B
Plaintext

import semmle.javascript.NodeJS
from Require r, string fullpath, string prefix
where fullpath = r.getImportedPath().getValue() and
sourceLocationPrefix(prefix)
select r, fullpath.replaceAll(prefix, ""), r.getImportedModule()