aboutsummaryrefslogtreecommitdiff
path: root/node_modules/webpack-sources/lib/RawSource.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-08-14 05:01:11 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-08-14 05:02:09 +0200
commit363723fc84f7b8477592e0105aeb331ec9a017af (patch)
tree29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/webpack-sources/lib/RawSource.js
parent5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff)
node_modules
Diffstat (limited to 'node_modules/webpack-sources/lib/RawSource.js')
-rw-r--r--node_modules/webpack-sources/lib/RawSource.js46
1 files changed, 24 insertions, 22 deletions
diff --git a/node_modules/webpack-sources/lib/RawSource.js b/node_modules/webpack-sources/lib/RawSource.js
index 0b9763938..b93ac4ef0 100644
--- a/node_modules/webpack-sources/lib/RawSource.js
+++ b/node_modules/webpack-sources/lib/RawSource.js
@@ -2,35 +2,37 @@
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
+"use strict";
+
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;
+class RawSource extends Source {
+ constructor(value) {
+ super();
+ this._value = value;
+ }
-RawSource.prototype = Object.create(Source.prototype);
-RawSource.prototype.constructor = RawSource;
+ source() {
+ return this._value;
+ }
-RawSource.prototype.source = function() {
- return this._value;
-};
+ map(options) {
+ return null;
+ }
-RawSource.prototype.map = function(options) {
- return null;
-};
+ node(options) {
+ return new SourceNode(null, null, null, this._value);
+ }
-RawSource.prototype.node = function(options) {
- return new SourceNode(null, null, null, this._value);
-};
+ listMap(options) {
+ return new SourceListMap(this._value);
+ }
-RawSource.prototype.listMap = function(options) {
- return new SourceListMap(this._value);
-};
+ updateHash(hash) {
+ hash.update(this._value);
+ }
+}
-RawSource.prototype.updateHash = function(hash) {
- hash.update(this._value);
-};
+module.exports = RawSource;