MCPcopy
hub / github.com/KilledByAPixel/LittleJS / saveText

Function saveText

src/engineUtilities.js:135–136  ·  view source on GitHub ↗

Save a text file to disk * @param {string} text * @param {string} [filename] * @param {string} [type] * @memberof Utilities

(text, filename='text', type='text/plain')

Source from the content-addressed store, hash-verified

133 * @param {string} [type]
134 * @memberof Utilities */
135function saveText(text, filename='text', type='text/plain')
136{ saveDataURL(URL.createObjectURL(new Blob([text], {'type':type})), filename); }
137
138/** Save a canvas to disk
139 * @param {HTMLCanvasElement|OffscreenCanvas} canvas

Callers

nothing calls this directly

Calls 1

saveDataURLFunction · 0.85

Tested by

no test coverage detected