inline-source-map-comment
Create an inline source map comment from a source map object or string
var inlineSourceMapComment = require('inline-source-map-comment');
var fixture = {
version:3,
file: 'output.js.map',
sources: ['input.js'],
names: [],
mappings: 'AAAA'
};
inlineSourceMapComment(fixture);
//=> "//# sourceMappingURL=data:application/json;base64,eyJ2ZXJza ..."Installation
Package managers
#### npm
npm install inline-source-map-comment#### bower
bower install inline-source-map-comment#### Duo
var inlineSourceMapComment = require('shinnn/inline-source-map-comment');Standalone
Download the script file directly.
API
inlineSourceMapComment(sourceMap [, options])
sourceMap: String or Object options: Object Return: String
It returns a line comment of base64-encoded source map.
Argument can be an object of source map or a JSON string.