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

Method appendImage

tools/mcmanifest.js:2268–2275  ·  view source on GitHub ↗
(name, path, include, suffix)

Source from the content-addressed store, hash-verified

2266 }
2267 }
2268 appendImage(name, path, include, suffix) {
2269 var tool = this.tool;
2270 if (tool.imageFiles.already[path])
2271 return;
2272 let file = this.appendFile(tool.imageFiles, name + ".cs", path, include);
2273 let a = suffix.match(/-image(\(([0-9]+)\))?/);
2274 file.quality = (a && (a.length == 3) && (a[2] !== undefined)) ? parseInt(a[2]) : undefined;
2275 }
2276 appendImageDirectory(name, path, include, suffix) {
2277 var tool = this.tool;
2278 var files = tool.imageFiles;

Callers 1

appendSourceMethod · 0.95

Calls 1

appendFileMethod · 0.45

Tested by

no test coverage detected