Urara-Blog/node_modules/.pnpm-store/v3/files/dd/7759c48f15c6bd49544138cc20dfb81fcb4016d1608a27a0a637591b7b68e315dbc53519ab76cffdfc3b19db0e071cd4f83a48aa6db05c8133af7bdedee69b
2022-08-14 01:14:53 +08:00

21 lines
506 B
Text

import btoa from './utils/btoa.js';
export default function SourceMap ( properties ) {
this.version = 3;
this.file = properties.file;
this.sources = properties.sources;
this.sourcesContent = properties.sourcesContent;
this.names = properties.names;
this.mappings = properties.mappings;
}
SourceMap.prototype = {
toString () {
return JSON.stringify( this );
},
toUrl () {
return 'data:application/json;charset=utf-8;base64,' + btoa( this.toString() );
}
};