source: trip-planner-front/node_modules/webpack-sources/lib/SourceAndMapMixin.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 764 bytes
RevLine 
[6a3a178]1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3 Author Tobias Koppers @sokra
4*/
5"use strict";
6
7module.exports = function mixinSourceAndMap(proto) {
8 proto.map = function(options) {
9 options = options || {};
10 if(options.columns === false) {
11 return this.listMap(options).toStringWithSourceMap({
12 file: "x"
13 }).map;
14 }
15
16 return this.node(options).toStringWithSourceMap({
17 file: "x"
18 }).map.toJSON();
19 };
20
21 proto.sourceAndMap = function(options) {
22 options = options || {};
23 if(options.columns === false) {
24 return this.listMap(options).toStringWithSourceMap({
25 file: "x"
26 });
27 }
28
29 var res = this.node(options).toStringWithSourceMap({
30 file: "x"
31 });
32 return {
33 source: res.code,
34 map: res.map.toJSON()
35 };
36 };
37}
Note: See TracBrowser for help on using the repository browser.