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

Function loadFile

docs/app/js/sanddance-app.js:62465–62473  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

62463 pathPrefix = prefix;
62464}
62465function loadFile(url) {
62466 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
62467 (0, _utils.assert)(typeof url === "string");
62468 url = pathPrefix + url;
62469 var dataType = options.dataType || "text";
62470 return fetch(url, options).then(function(res) {
62471 return res[dataType]();
62472 });
62473}
62474function loadImage(url, opts) {
62475 (0, _utils.assert)(typeof url === "string");
62476 url = pathPrefix + url;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected