MCPcopy Index your code
hub / github.com/css/csso / defineSourceMap

Function defineSourceMap

test/sourceMaps.js:50–60  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

48}
49
50function defineSourceMap(filename) {
51 const string = `{"version":3,"sources":["${filename}"],"names":[],"mappings":"AAAA,E,CAAK,S,CACL,E,CAAK,a,CAAgB,U","file":"${filename}","sourcesContent":[${JSON.stringify(css)}]}`;
52 const base64 = Buffer.from(string, 'utf8').toString('base64');
53 const inline = `/*# sourceMappingURL=data:application/json;base64,${base64} */`;
54
55 return {
56 string,
57 base64,
58 inline
59 };
60}
61
62function extractSourceMap(source) {
63 const m = source.match(/\/\*# sourceMappingURL=data:application\/json;base64,(.+) \*\//);

Callers 1

sourceMaps.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…