MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / loadFile

Function loadFile

src/lib/svg-file-parser.js:8–20  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

6}
7
8async function loadFile(url) {
9 const response = await fetch(url);
10 const data = await response.text();
11 if (response.ok) {
12 return data;
13 } else {
14 return Promise.reject({
15 status: response.status,
16 statusText: response.statusText,
17 err: data
18 });
19 }
20}

Callers 1

parseSVGFunction · 0.85

Calls 2

fetchFunction · 0.85
rejectMethod · 0.80

Tested by

no test coverage detected