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

Method toUrl

src/SourceMap.ts:133–135  ·  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

131 * `generateMap(options?: SourceMapOptions): SourceMap;`
132 */
133 toUrl(): string {
134 return `data:application/json;charset=utf-8;base64,${btoa(this.toString())}`
135 }
136}

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.95

Tested by

no test coverage detected