diff options
Diffstat (limited to 'node_modules/webpack-sources/lib/RawSource.js')
-rw-r--r-- | node_modules/webpack-sources/lib/RawSource.js | 46 |
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;
|