MCPcopy Create free account
hub / github.com/davidkingzyb/SCAST / _saveFile

Function _saveFile

js/common.js:158–165  ·  view source on GitHub ↗
(content, fileName)

Source from the content-addressed store, hash-verified

156}
157
158function _saveFile(content, fileName) {
159 var blob = new Blob([content], { type: "text/plain;charset=utf-8" });
160 var url = URL.createObjectURL(blob);
161 var link = document.createElement('a');
162 link.href = url;
163 link.download = fileName;
164 link.click();
165}
166
167function _saveServer(content,fileName){
168 console.log('save to server',fileName)

Callers 3

saveTldrawFunction · 0.85
saveMermaidFunction · 0.85
saveD3Function · 0.85

Calls 1

createElementMethod · 0.80

Tested by

no test coverage detected