Name Description Size Coverage
ArrayHelpers.js Compare two arrays or strings by performing strict equality check for each value. @template T @param {ArrayLike<T>} a Array of values to be compared @param {ArrayLike<T>} b Array of values to be compared @returns {boolean} returns true if all the elements of passed arrays are strictly equal. 1533 -
ArrayQueue.js FIFO queue backed by arrays with a reversed dequeue buffer to avoid the cost of repeated `Array#shift` operations. @template T 2384 -
AsyncQueue.js Defines the callback callback. @template T @callback Callback @param {(WebpackError | null)=} err @param {(T | null)=} result @returns {void} 12846 -
binarySearchBounds.js cspell:disable-next-line 4469 -
chainedImports.js @typedef {import("../Dependency")} Dependency 4355 -
cleverMerge.js @type {WeakMap<EXPECTED_OBJECT, WeakMap<EXPECTED_OBJECT, EXPECTED_OBJECT>>} 20886 -
comparators.js @typedef {import("../Chunk")} Chunk 19165 -
compileBooleanMatcher.js Returns quoted meta. @param {string} str string @returns {string} quoted meta 9106 -
concatenate.js @typedef {import("estree").Node} Node 8759 -
conventions.js @typedef {import("../../declarations/WebpackOptions").CssGeneratorExportsConvention} CssGeneratorExportsConvention 4202 -
createHash.js @typedef {import("./Hash")} Hash 2569 -
createHooksRegistry.js @template T @param {() => T} createHooks factory that returns a fresh hooks object @returns {(compilation: import("../Compilation")) => T} getter that returns (or creates) hooks for the compilation 1209 -
createMappings.js Utilities for building V3 source-map `mappings` strings without pulling in a full source-map library. The shape of the input is intentionally minimal — one slot per generated line, each holding zero, one, or many segments — so call sites that have a "one mapping per line" structure (like the CSS-module exports emit in `lib/css/CssGenerator.js`) can build mappings directly, while richer call sites can pass arrays of segments. TODO move this encoder into `webpack-sources` and replace the body of this file with re-exports. The public shape (`encodeVLQ`, `encodeMappings(lines)`, `MappingSegment`, `LineMappings`) is intended to match what would land upstream so call sites don't have to change. 4160 -
dataURL.js Decodes the provided uri. @param {string} uri data URI @returns {Buffer | null} decoded data 1072 -
deprecation.js @type {Map<string, () => void>} 10151 -
deterministicGrouping.js Returns the similarity as number. @param {string} a key @param {string} b key @returns {number} the similarity as number 15984 -
extractSourceMap.js @typedef {import("./fs").InputFileSystem} InputFileSystem 8631 -
extractUrlAndGlobal.js Returns script url and its global variable. @param {string} urlAndGlobal the script request @returns {string[]} script url and its global variable 570 -
findGraphRoots.js Defines the nodes type used by this module. @template T @typedef {Set<Node<T>>} Nodes 5702 -
formatLocation.js @typedef {import("../Dependency").DependencyLocation} DependencyLocation 1836 -
formatSize.js Returns the formatted size. @param {number=} size the size in bytes @returns {string} the formatted size 766 -
fs.js @typedef {import("../../declarations/WebpackOptions").WatchOptions} WatchOptions 28998 -
generateDebugId.js Returns generated debug id. @param {string | Buffer} content content @param {string} file file @returns {string} generated debug id 953 -
globUtils.js @type {{ util: { globToRegExp: (glob: string) => string } }} 19626 -
hash -
Hash.js @typedef {import("../../declarations/WebpackOptions").HashDigest} Encoding 1927 -
identifier.js Relative path to request. @param {string} relativePath relative path @returns {string} request 18024 -
implicitTypeLoaderFallback.js @typedef {import("../NormalModuleFactory")} NormalModuleFactory 2335 -
internalSerializables.js 13605 -
IterableHelpers.js Returns last item. @template T @param {Iterable<T>} set a set @returns {T | undefined} last item 1101 -
LazyBucketSortedSet.js Callback that extracts the grouping key for an item at one bucket layer. @template T @template K @typedef {(item: T) => K} GetKey 7702 -
LazySet.js Merges every queued iterable directly into the concrete backing set. @template T @param {Set<T>} targetSet set where items should be added @param {Set<Iterable<T>>} toMerge iterables to be merged @returns {void} 7235 -
LocConverter.js Creates an instance of LocConverter. @param {string} input input 1689 -
magicComment.js @type {Readonly<{ options: null, errors: null }>} 5616 -
makeSerializable.js @typedef {import("../serialization/ObjectMiddleware").Constructor} Constructor 2214 -
MapHelpers.js getOrInsert is a helper function for maps that allows you to get a value from a map if it exists, or insert a new value if it doesn't. If it value doesn't exist, it will be computed by the provided function. @template K @template V @param {Map<K, V>} map The map object to check @param {K} key The key to check @param {() => V} computer function which will compute the value if it doesn't exist @returns {V} The value from the map, or the computed value @example ```js const map = new Map(); const value = getOrInsert(map, "key", () => "value"); console.log(value); // "value" ``` 1081 -
memoize.js Defines the function returning type used by this module. @template T @typedef {() => T} FunctionReturning 766 -
mimeTypes.js RegExp to match type in RFC 6838 type-name = restricted-name subtype-name = restricted-name restricted-name = restricted-name-first *126restricted-name-chars restricted-name-first = ALPHA / DIGIT restricted-name-chars = ALPHA / DIGIT / "!" / "#" / "$" / "&" / "-" / "^" / "_" restricted-name-chars =/ "." ; Characters before first dot always specify a facet name restricted-name-chars =/ "+" ; Characters after last plus always specify a structured syntax suffix ALPHA = %x41-5A / %x61-7A ; A-Z / a-z DIGIT = %x30-39 ; 0-9 4338 -
nonNumericOnlyHash.js @typedef {import("./Hash")} Hash 1802 -
numberHash.js Threshold for switching from 32-bit to 64-bit hashing. This is selected to ensure that the bias towards lower modulo results when using 32-bit hashing is <0.5%. @type {number} 2934 -
objectToMap.js Convert an object into an ES6 map @template {object} T @param {T} obj any object type that works with Object.entries() @returns {Map<string, T[keyof T]>} an ES6 Map of KV pairs 369 -
ParallelismFactorCalculator.js @typedef {(value: number) => void} Callback 1823 -
parseJson.js @typedef {import("../util/fs").JsonValue} JsonValue 1068 -
processAsyncTree.js Walks a dynamically expanding async work tree with bounded concurrency. Each processed item may enqueue more items through `push`, allowing callers to model breadth-first or depth-first discovery without managing the queue themselves. @template T @template {Error} E @param {Iterable<T>} items initial items @param {number} concurrency number of items running in parallel @param {(item: T, push: (item: T) => void, callback: (err?: E) => void) => void} processor worker which pushes more items @param {(err?: E) => void} callback all items processed @returns {void} 2114 -
property.js @summary Returns a valid JS property name for the given property. Certain strings like "default", "null", and names with whitespace are not valid JS property names, so they are returned as strings. @param {string} prop property name to analyze @returns {string} valid JS property name 2135 -
publicPathPlaceholder.js Scan `content` for `PUBLIC_PATH_FULL_HASH` placeholders and invoke `onMatch` once per well-formed occurrence. The placeholder spans the half-open range `[start, end)` and encodes the requested hash length (`0` means the full hash). Callers substitute the build-time hash or a runtime expression depending on context. @param {string} content text to scan @param {(start: number, end: number, length: number) => void} onMatch placeholder callback @returns {void} 2519 -
Queue.js FIFO queue that keeps items unique by storing them in insertion order inside a `Set`. @template T 1184 -
registerExternalSerializer.js @typedef {import("acorn").Position} Position 9288 -
removeBOM.js Returns result without BOM. @param {string | Buffer} strOrBuffer string or buffer @returns {string | Buffer} result without BOM 617 -
runtime.js @typedef {import("../Compilation")} Compilation 18471 -
Semaphore.js Simple counting semaphore used to limit how many asynchronous tasks may run concurrently. 1495 -
semver.js @typedef {import("../RuntimeTemplate")} RuntimeTemplate 18677 -
serialization.js @typedef {import("../serialization/BinaryMiddleware").MEASURE_END_OPERATION_TYPE} MEASURE_END_OPERATION 4663 -
SetHelpers.js intersect creates Set containing the intersection of elements between all sets @template T @param {Set<T>[]} sets an array of sets being checked for shared elements @returns {Set<T>} returns a new Set containing the intersecting items 2466 -
smartGrouping.js Defines the group options type used by this module. @typedef {object} GroupOptions @property {boolean=} groupChildren @property {boolean=} force @property {number=} targetGroupCount 5852 -
SortableSet.js A subset of Set that offers sorting functionality @template T item type in set @extends {Set<T>} 4075 -
source.js @typedef {import("webpack-sources").Source} Source 2748 -
SourceProcessor.js Babel-style visitor map keyed by a numeric node-type discriminator; a bucket is a function (enter-only) or `{ enter?, exit? }`. A visitor receives a single `path` argument (the Babel `path` shape): the language's AST accessor with the current position on it — `path.node`, `path.parent` (null at a root) — plus `path.skipChildren()` (enter only) to stop the walk descending, and every field-read method (which defaults to the current node). The path is one reused object rebound before each callback: it is only valid during the callback, and future per-node functionality lands on it without changing any visitor signature. @template TPath @typedef {(path: TPath) => void} VisitorFn 3956 -
StackedCacheMap.js The StackedCacheMap is a data structure designed as an alternative to a Map in situations where you need to handle multiple item additions and frequently access the largest map. It is particularly optimized for efficiently adding multiple items at once, which can be achieved using the `addAll` method. It has a fallback Map that is used when the map to be added is mutable. Note: `delete` and `has` are not supported for performance reasons. @example ```js const map = new StackedCacheMap(); map.addAll(new Map([["a", 1], ["b", 2]]), true); map.addAll(new Map([["c", 3], ["d", 4]]), true); map.get("a"); // 1 map.get("d"); // 4 for (const [key, value] of map) { console.log(key, value); } ``` @template K @template V 4108 -
StackedMap.js Public cell value exposed by `StackedMap`, where `undefined` is preserved as a valid stored result. @template T @typedef {T | undefined} Cell<T> 7551 -
StringXor.js @typedef {import("../util/Hash")} Hash 3100 -
topologicalSort.js Topologically sort `nodes` using Kahn's algorithm with source-order tie-breaking. Nodes that participate in a cycle remain unvisited — `visit` is never called for them — so the caller can naturally keep them in their original position by treating "no visit" as "keep source order". Precondition: every node appearing in `graph` (as a key OR inside any successor set) must also appear in `nodes`. The caller owns this invariant; the function does not validate it. Complexity: O(V·(V + E)). Each outer iteration scans the ready set linearly to find the smallest source-index node. CSS composes graphs are small (a handful of files per module) so this is fine; if a much larger graph ever needs sorting here, swap in a min-heap. @template T @param {Map<T, Set<T>>} graph adjacency list (`a -> b` means `a` must come before `b`) @param {T[]} nodes nodes in source first-appearance order @param {(node: T, index: number) => void} visit called once per non-cyclic node in topological order @returns {void} 2382 -
traverseDestructuringAssignmentProperties.js @typedef {import("../javascript/JavascriptParser").DestructuringAssignmentProperties} DestructuringAssignmentProperties 1490 -
TupleQueue.js FIFO queue for tuples that preserves uniqueness by delegating membership tracking to `TupleSet`. @template T @template V 1819 -
TupleSet.js Nested map structure used to index tuple prefixes until the final tuple element can be stored in a `Set`. @template K @template V @typedef {Map<K, InnerMap<K, V> | Set<V>>} InnerMap 4929 -
URLAbsoluteSpecifier.js @typedef {(error: Error | null, result?: Buffer) => void} ErrorFirstCallback 2536 -
WeakTupleMap.js Strong-key child map used for tuple elements that cannot be stored in a `WeakMap`. @template {EXPECTED_ANY[]} T @template V @typedef {Map<EXPECTED_ANY, WeakTupleMap<T, V>>} M 7478 -