MCPcopy
hub / github.com/webpack/webpack / getOriginPath

Function getOriginPath

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

Source from the content-addressed store, hash-verified

245 * @returns {string} JSON pointer to the deepest schema part
246 */
247 const getOriginPath = (path) => {
248 let origin = "";
249 for (let i = path.length - 1; i >= 0; i--) {
250 const { segment } = path[i];
251 origin = segment[0] === "#" ? segment : origin + segment;
252 }
253 return origin;
254 };
255
256 /**
257 * Adds the provided path to this object.

Callers 1

addFlagFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected