MCPcopy Index your code
hub / github.com/Moddable-OpenSource/moddable / parseManifest

Method parseManifest

tools/mcbundle.js:114–127  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

112 }
113 }
114 parseManifest(path) {
115 const buffer = this.readFileString(path);
116 try {
117 return JSON.parse(buffer);
118 }
119 catch (e) {
120 const message = e.toString();
121 const result = /SyntaxError: ([^:]+: )?([0-9]+): (.+)/.exec(message);
122 if (result.length == 4) {
123 this.reportError(path, parseInt(result[2]), result[3]);
124 }
125 throw new Error("'" + path + "': invalid manifest!");;
126 }
127 }
128 resolveSlash(value) {
129 if (this.windows)
130 value = value.replace(/\//g, "\\");

Callers 1

runMethod · 0.45

Calls 2

parseMethod · 0.65
toStringMethod · 0.45

Tested by

no test coverage detected