Sha256: b059e43e056f9589f44aa973f2b5d73144dfa171739bb9b225bf858806683987

Contents?: true

Size: 861 Bytes

Versions: 3

Compression:

Stored size: 861 Bytes

Contents

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
var Source = require("./Source");
var SourceNode = require("source-map").SourceNode;
var SourceListMap = require("source-list-map").SourceListMap;

function RawSource(value) {
	Source.call(this);
	this._value = value;
}
module.exports = RawSource;

RawSource.prototype = Object.create(Source.prototype);
RawSource.prototype.constructor = RawSource;

RawSource.prototype.source = function() {
	return this._value;
};

RawSource.prototype.map = function(options) {
	return null;
};

RawSource.prototype.node = function(options) {
	return new SourceNode(null, null, null, this._value);
};

RawSource.prototype.listMap = function(options) {
	return new SourceListMap(this._value);
};

RawSource.prototype.updateHash = function(hash) {
	hash.update(this._value);
};

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ilog-0.4.1 node_modules/webpack-sources/lib/RawSource.js
ilog-0.4.0 node_modules/webpack-sources/lib/RawSource.js
ilog-0.3.3 node_modules/webpack-sources/lib/RawSource.js