init
This commit is contained in:
30
node_modules/combine-source-map/lib/mappings-from-map.js
generated
vendored
Normal file
30
node_modules/combine-source-map/lib/mappings-from-map.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
var SMConsumer = require('source-map').SourceMapConsumer;
|
||||
|
||||
/**
|
||||
* @name mappingsFromMap
|
||||
* @function
|
||||
* @param map {Object} the JSON.parse()'ed map
|
||||
* @return {Array} array of mappings
|
||||
*/
|
||||
module.exports = function (map) {
|
||||
var consumer = new SMConsumer(map);
|
||||
var mappings = [];
|
||||
|
||||
consumer.eachMapping(function (mapping) {
|
||||
// only set source if we have original position to handle edgecase (see inline-source-map tests)
|
||||
mappings.push({
|
||||
original: mapping.originalColumn != null ? {
|
||||
column: mapping.originalColumn
|
||||
, line: mapping.originalLine
|
||||
} : undefined
|
||||
, generated: {
|
||||
column: mapping.generatedColumn
|
||||
, line: mapping.generatedLine
|
||||
}
|
||||
, source: mapping.originalColumn != null ? mapping.source : undefined
|
||||
, name: mapping.name
|
||||
});
|
||||
});
|
||||
|
||||
return mappings;
|
||||
}
|
20
node_modules/combine-source-map/lib/path-is-absolute.js
generated
vendored
Normal file
20
node_modules/combine-source-map/lib/path-is-absolute.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
function posix(path) {
|
||||
return path.charAt(0) === '/';
|
||||
};
|
||||
|
||||
function win32(path) {
|
||||
// https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
|
||||
var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
|
||||
var result = splitDeviceRe.exec(path);
|
||||
var device = result[1] || '';
|
||||
var isUnc = !!device && device.charAt(1) !== ':';
|
||||
|
||||
// UNC paths are always absolute
|
||||
return !!result[2] || isUnc;
|
||||
};
|
||||
|
||||
module.exports = process.platform === 'win32' ? win32 : posix;
|
||||
module.exports.posix = posix;
|
||||
module.exports.win32 = win32;
|
21
node_modules/combine-source-map/lib/path-is-absolute.license
generated
vendored
Normal file
21
node_modules/combine-source-map/lib/path-is-absolute.license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
Reference in New Issue
Block a user