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

Method toUrl

src/SourceMap.ts:106–108  ·  view source on GitHub ↗

* Returns a DataURI containing the sourcemap. Useful for doing this sort of thing: * `generateMap(options?: SourceMapOptions): SourceMap;`

()

Source from the content-addressed store, hash-verified

104 * `generateMap(options?: SourceMapOptions): SourceMap;`
105 */
106 toUrl(): string {
107 return `data:application/json;charset=utf-8;base64,${btoa(this.toString())}`
108 }
109}

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.95

Tested by

no test coverage detected