MCPcopy
hub / github.com/webpack/webpack / getSchemaPart

Function getSchemaPart

lib/cli.js:111–127  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

109 * @returns {Schema} schema part
110 */
111 const getSchemaPart = (path) => {
112 const newPath = path.split("/");
113
114 let schemaPart = schema;
115
116 for (let i = 1; i < newPath.length; i++) {
117 const inner = schemaPart[/** @type {keyof Schema} */ (newPath[i])];
118
119 if (!inner) {
120 break;
121 }
122
123 schemaPart = inner;
124 }
125
126 return schemaPart;
127 };
128
129 /**
130 * Returns description.

Callers 1

traverseFunction · 0.85

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected