mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-03 03:09:29 +08:00
21 lines
506 B
Text
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() );
|
|
}
|
|
};
|