Get unlimited public & private packages + team-based management with npm Teams.Learn more »

source-map-to-comment

2.0.0 • Public • Published

source-map-to-comment Build Status

Convert a Source Map object to a comment

Install

$ npm install source-map-to-comment

Usage

const sourceMapToComment = require('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... */'

Install

npm i source-map-to-comment

DownloadsWeekly Downloads

5,875

Version

2.0.0

License

MIT

Unpacked Size

2.85 kB

Total Files

4

Last publish

Collaborators

  • avatar