MCPcopy Create free account
hub / github.com/microsoft/SandDance / serializeSnapshot

Function serializeSnapshot

docs/app/js/sanddance-app.js:52075–52082  ·  view source on GitHub ↗
(snapshotWithImage)

Source from the content-addressed store, hash-verified

52073 (0, _download.downloadData)(JSON.stringify(clean, null, 2), filename);
52074}
52075function serializeSnapshot(snapshotWithImage) {
52076 const snapshot = util.clone(snapshotWithImage);
52077 //remove the image data from the snapshot
52078 delete snapshot.bgColor;
52079 delete snapshot.image;
52080 if (snapshot.dataSource) delete snapshot.dataSource.rawText;
52081 return JSON.stringify(snapshot);
52082}
52083function isSnapshot(snapshot) {
52084 return snapshot.insight && snapshot.title;
52085}

Callers 1

SnapshotExportFunction · 0.70

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected