CodeQL library for JavaScript/TypeScript
codeql/javascript-all 0.9.1 (changelog, source)
Search

Module Bundling

Provides classes and predicates for detecting files generated by popular module bundlers.

Import path

import semmle.javascript.frameworks.Bundling

Imports

javascript

Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.

Predicates

getExclamationPointCommentInRun

Gets a comment that belongs to a run of consecutive ExclamationPointComments starting with head.

isBrowserifyBundle

Holds if oe looks like it was produced by Browserify.

isBundle

Holds if toplevel tl contains code that looks like the output of a module bundler.

isDirectiveBundle

Holds if this is a bundle with a “bundle” directive.

isMultiLicenseBundle

Holds if this is a bundle containing multiple licenses.

isMultiPartBundle

Holds if tl is a collection of concatenated files by atpackager.

isWebpackBundle

Holds if ae looks like it was produced by Webpack.

isWebpackNamedBundle

Holds if object looks like a Webpack bundle of form: javascript var __webpack_modules__ = ({ "file1": ((module, __webpack__exports__, __webpack_require__) => ...) ... })

Classes

ExclamationPointComment

A comment that starts with ‘!’. Minifiers avoid removing such comments.