MCPcopy
hub / github.com/webpack/webpack / markPure

Method markPure

lib/optimize/SideEffectsFlagPlugin.js:344–349  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

342 * @param {string} name function name
343 */
344 const markPure = (name) => {
345 if (pureFunctions === undefined) pureFunctions = new Set();
346 else if (pureFunctions.has(name)) return;
347 parser.tagVariable(name, notSideEffectsTag, {});
348 pureFunctions.add(name);
349 };
350
351 // Detect on function declarations
352 // Covers:

Callers

nothing calls this directly

Calls 3

tagVariableMethod · 0.80
hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected