Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: node_modules/vulcanize/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js

Issue 800513006: Added vulcanize under third_party/npm_modules (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: node_modules/vulcanize/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js
diff --git a/node_modules/karma/node_modules/source-map/lib/source-map/util.js b/node_modules/vulcanize/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js
similarity index 95%
copy from node_modules/karma/node_modules/source-map/lib/source-map/util.js
copy to node_modules/vulcanize/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js
index 976f6cabb08d2fcb05ae2ee575ba4d4d73a0e5a6..4316445f2da234e6f01a1fc2422c9d14373b0f2e 100644
--- a/node_modules/karma/node_modules/source-map/lib/source-map/util.js
+++ b/node_modules/vulcanize/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js
@@ -143,12 +143,6 @@ define(function (require, exports, module) {
* - Joining for example 'http://' and 'www.example.com' is also supported.
*/
function join(aRoot, aPath) {
- if (aRoot === "") {
- aRoot = ".";
- }
- if (aPath === "") {
- aPath = ".";
- }
var aPathUrl = urlParse(aPath);
var aRootUrl = urlParse(aRoot);
if (aRootUrl) {
@@ -186,31 +180,6 @@ define(function (require, exports, module) {
exports.join = join;
/**
- * Make a path relative to a URL or another path.
- *
- * @param aRoot The root path or URL.
- * @param aPath The path or URL to be made relative to aRoot.
- */
- function relative(aRoot, aPath) {
- if (aRoot === "") {
- aRoot = ".";
- }
-
- aRoot = aRoot.replace(/\/$/, '');
-
- // XXX: It is possible to remove this block, and the tests still pass!
- var url = urlParse(aRoot);
- if (aPath.charAt(0) == "/" && url && url.path == "/") {
- return aPath.slice(1);
- }
-
- return aPath.indexOf(aRoot + '/') === 0
- ? aPath.substr(aRoot.length + 1)
- : aPath;
- }
- exports.relative = relative;
-
- /**
* Because behavior goes wacky when you set `__proto__` on objects, we
* have to prefix all the strings in our set with an arbitrary character.
*
@@ -229,6 +198,20 @@ define(function (require, exports, module) {
}
exports.fromSetString = fromSetString;
+ function relative(aRoot, aPath) {
+ aRoot = aRoot.replace(/\/$/, '');
+
+ var url = urlParse(aRoot);
+ if (aPath.charAt(0) == "/" && url && url.path == "/") {
+ return aPath.slice(1);
+ }
+
+ return aPath.indexOf(aRoot + '/') === 0
+ ? aPath.substr(aRoot.length + 1)
+ : aPath;
+ }
+ exports.relative = relative;
+
function strcmp(aStr1, aStr2) {
var s1 = aStr1 || "";
var s2 = aStr2 || "";

Powered by Google App Engine
This is Rietveld 408576698