MCPcopy
hub / github.com/livebud/bud / apply_preprocessor_sourcemap

Function apply_preprocessor_sourcemap

package/svelte/compiler.js:22168–22191  ·  view source on GitHub ↗
(filename, svelte_map, preprocessor_map_input)

Source from the content-addressed store, hash-verified

22166 }
22167 var b64enc = typeof btoa == "function" ? btoa : (b2) => Buffer.from(b2).toString("base64");
22168 function apply_preprocessor_sourcemap(filename, svelte_map, preprocessor_map_input) {
22169 if (!svelte_map || !preprocessor_map_input)
22170 return svelte_map;
22171 const preprocessor_map = typeof preprocessor_map_input === "string" ? JSON.parse(preprocessor_map_input) : preprocessor_map_input;
22172 const result_map = combine_sourcemaps(filename, [
22173 svelte_map,
22174 preprocessor_map
22175 ]);
22176 Object.defineProperties(result_map, {
22177 toString: {
22178 enumerable: false,
22179 value: function toString5() {
22180 return JSON.stringify(this);
22181 }
22182 },
22183 toUrl: {
22184 enumerable: false,
22185 value: function toUrl2() {
22186 return "data:application/json;charset=utf-8;base64," + b64enc(this.toString());
22187 }
22188 }
22189 });
22190 return result_map;
22191 }
22192 function check_enable_sourcemap(enable_sourcemap, namespace) {
22193 return typeof enable_sourcemap === "boolean" ? enable_sourcemap : enable_sourcemap[namespace];
22194 }

Callers 2

domFunction · 0.85
generateMethod · 0.85

Calls 4

combine_sourcemapsFunction · 0.85
parseMethod · 0.80
stringifyMethod · 0.80
toStringMethod · 0.80

Tested by

no test coverage detected