MCPcopy Create free account
hub / github.com/Rich-Harris/magic-string / b

Class b

benchmark/data-min.js:118–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116 ? (w = (l) => window.btoa(unescape(encodeURIComponent(l))))
117 : typeof Buffer == 'function' && (w = (l) => Buffer.from(l, 'utf-8').toString('base64'));
118class b {
119 constructor(t) {
120 ((this.version = 3),
121 (this.file = t.file),
122 (this.sources = t.sources),
123 (this.sourcesContent = t.sourcesContent),
124 (this.names = t.names),
125 (this.mappings = k(t.mappings)));
126 }
127 toString() {
128 return JSON.stringify(this);
129 }
130 toUrl() {
131 return 'data:application/json;charset=utf-8;base64,' + w(this.toString());
132 }
133}
134function L(l) {
135 const t = l.split(`
136`),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected