MCPcopy
hub / github.com/microsoft/SandDance / deleteImage

Function deleteImage

docs/app/js/sanddance-app.js:57507–57514  ·  view source on GitHub ↗
(image)

Source from the content-addressed store, hash-verified

57505 return Boolean(getImageTypeOrNull(image));
57506}
57507function deleteImage(image) {
57508 switch(getImageType(image)){
57509 case "imagebitmap":
57510 image.close();
57511 break;
57512 default:
57513 }
57514}
57515function getImageType(image) {
57516 var format = getImageTypeOrNull(image);
57517 if (!format) throw new Error("Not an image");

Callers

nothing calls this directly

Calls 2

getImageTypeFunction · 0.70
closeMethod · 0.65

Tested by

no test coverage detected