Sha256: 127f666a91062be3dcafd723f4eefa7405382a0696a86995fbb917cecf8e1fc0
Contents?: true
Size: 1.17 KB
Versions: 62
Compression:
Stored size: 1.17 KB
Contents
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ var SourceNode = require("source-map").SourceNode; var SourceMapConsumer = require("source-map").SourceMapConsumer; var SourceMapGenerator = require("source-map").SourceMapGenerator; var SourceMapNodeSource = require("./SourceMapNodeSource"); function SourceMapSource(value, name, sourceMap, originalSource, innerSourceMap) { if(innerSourceMap) { innerSourceMap = new SourceMapConsumer(innerSourceMap); sourceMap = SourceMapGenerator.fromSourceMap(new SourceMapConsumer(sourceMap)); sourceMap.setSourceContent(name, originalSource); sourceMap.applySourceMap(innerSourceMap, name); sourceMap = sourceMap.toJSON(); } var node = SourceNode.fromStringWithSourceMap(value, new SourceMapConsumer(sourceMap)); SourceMapNodeSource.call(this, node); this._value = value; this._name = name; } module.exports = SourceMapSource; SourceMapSource.prototype = Object.create(SourceMapNodeSource.prototype); SourceMapSource.prototype.source = function() { return this._value; }; SourceMapSource.prototype.updateHash = function(hash) { hash.update(this._value); hash.update(this._name); };
Version data entries
62 entries across 62 versions & 1 rubygems