MCPcopy
hub / github.com/webpack/webpack / walkDefinitions

Method walkDefinitions

lib/DefinePlugin.js:482–496  ·  lib/DefinePlugin.js::DefinePlugin.walkDefinitions
(definitions, prefix)

Source from the content-addressed store, hash-verified

480 * @returns {void}
481 */
482 const walkDefinitions = (definitions, prefix) => {
483 for (const key of Object.keys(definitions)) {
484 const code = definitions[key];
485 if (isObjectDefinition(code)) {
486 walkDefinitions(
487 /** @type {Definitions} */ (code),
488 `${prefix + key}.`
489 );
490 applyObjectDefine(prefix + key, code);
491 continue;
492 }
493 applyDefineKey(prefix, key);
494 applyDefine(prefix + key, code);
495 }
496 };
497
498 /**
499 * Processes the provided prefix.

Callers

nothing calls this directly

Calls 2

isObjectDefinitionFunction · 0.85
keysMethod · 0.65

Tested by

no test coverage detected