source: frontend/node_modules/source-map/lib/read-wasm-browser.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 602 bytes
RevLine 
[9af201e]1"use strict";
2
3let mappingsWasm = null;
4
5module.exports = function readWasm() {
6 if (typeof mappingsWasm === "string") {
7 return fetch(mappingsWasm).then(response => response.arrayBuffer());
8 }
9 if (mappingsWasm instanceof ArrayBuffer) {
10 return Promise.resolve(mappingsWasm);
11 }
12
13 throw new Error(
14 "You must provide the string URL or ArrayBuffer contents " +
15 "of lib/mappings.wasm by calling " +
16 "SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) " +
17 "before using SourceMapConsumer"
18 );
19};
20
21module.exports.initialize = input => {
22 mappingsWasm = input;
23};
Note: See TracBrowser for help on using the repository browser.