From 363723fc84f7b8477592e0105aeb331ec9a017af Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 14 Aug 2017 05:01:11 +0200 Subject: node_modules --- node_modules/webpack-sources/lib/Source.js | 51 ++++++++++++++++++------------ 1 file changed, 30 insertions(+), 21 deletions(-) (limited to 'node_modules/webpack-sources/lib/Source.js') diff --git a/node_modules/webpack-sources/lib/Source.js b/node_modules/webpack-sources/lib/Source.js index 1c729fcf1..c8300f44e 100644 --- a/node_modules/webpack-sources/lib/Source.js +++ b/node_modules/webpack-sources/lib/Source.js @@ -2,35 +2,44 @@ MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ +"use strict"; + var SourceNode = require("source-map").SourceNode; var SourceMapConsumer = require("source-map").SourceMapConsumer; -function Source() {} +class Source { -module.exports = Source; + source() { + throw new Error("Abstract"); + } -Source.prototype.source = null; + size() { + return this.source().length; + } -Source.prototype.size = function() { - return this.source().length; -}; + map(options) { + return null; + } -Source.prototype.map = function(options) { - return null; -}; + sourceAndMap(options) { + return { + source: this.source(), + map: this.map() + }; + } -Source.prototype.sourceAndMap = function(options) { - return { - source: this.source(), - map: this.map() - }; -}; + node() { + throw new Error("Abstract"); + } -Source.prototype.node = null; + listNode() { + throw new Error("Abstract"); + } -Source.prototype.listNode = null; + updateHash(hash) { + var source = this.source(); + hash.update(source || ""); + } +} -Source.prototype.updateHash = function(hash) { - var source = this.source(); - hash.update(source || ""); -}; +module.exports = Source; -- cgit v1.2.3