$ npm install source-map-to-commentConvert a Source Map object to a comment
$ npm install source-map-to-comment
import sourceMapToComment from 'source-map-to-comment';
const sourceMap = getSourceMapObjectFromSomething();
sourceMapToComment(sourceMap);
//=> '//# sourceMappingURL=data:application/json;base64,eyJ2Z...'
sourceMapToComment(JSON.stringify(sourceMap));
//=> '//# sourceMappingURL=data:application/json;base64,eyJ2Z...'
sourceMapToComment(sourceMap, {type: 'css'});
//=> '/*# sourceMappingURL=data:application/json;base64,eyJ2Z... */'