MCPcopy
hub / github.com/webpack/webpack / setValue

Function setValue

lib/cli.js:647–657  ·  view source on GitHub ↗
(config, schemaPath, value, index)

Source from the content-addressed store, hash-verified

645 * @returns {LocalProblem | null} problem or null for success
646 */
647const setValue = (config, schemaPath, value, index) => {
648 const { problem, object, property } = getObjectAndProperty(
649 config,
650 schemaPath,
651 index
652 );
653 if (problem) return problem;
654 /** @type {ObjectConfiguration} */
655 (object)[/** @type {Property} */ (property)] = value;
656 return null;
657};
658
659/**
660 * Process argument config.

Callers 1

processArgumentConfigFunction · 0.70

Calls 1

getObjectAndPropertyFunction · 0.85

Tested by

no test coverage detected