MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / resolvePrefix

Method resolvePrefix

tools/mcpack.js:1228–1234  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

1226 }
1227 }
1228 resolvePrefix(value) {
1229 const colon = value.indexOf(":");
1230 if (colon > 0) {
1231 value = "~." + value.slice(0, colon) + "/" + value.slice(colon + 1);
1232 }
1233 return value;
1234 }
1235 resolveSlash(value) {
1236 if (this.windows)
1237 value = value.replace(/\//g, "\\");

Callers 2

processMethod · 0.45
filterPreloadMethod · 0.45

Calls 1

sliceMethod · 0.65

Tested by

no test coverage detected