CodeQL library for JavaScript/TypeScript
codeql/javascript-all 1.0.3-dev (changelog, source)

Member predicate PathString::getExtension

Gets the extension of the folder or file this path refers to, that is, the suffix of the base name starting at the last dot character, if there is one.

Has no result if the base name does not contain a dot.

string getExtension()