Module Bundling

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

Import path

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.

Classes

ExclamationPointComment

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