summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/url-parse-lax/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/url-parse-lax/index.js')
-rw-r--r--deps/npm/node_modules/url-parse-lax/index.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/deps/npm/node_modules/url-parse-lax/index.js b/deps/npm/node_modules/url-parse-lax/index.js
new file mode 100644
index 0000000000..f9c0c65afd
--- /dev/null
+++ b/deps/npm/node_modules/url-parse-lax/index.js
@@ -0,0 +1,14 @@
+'use strict';
+var url = require('url');
+var prependHttp = require('prepend-http');
+
+module.exports = function (x) {
+ var withProtocol = prependHttp(x);
+ var parsed = url.parse(withProtocol);
+
+ if (withProtocol !== x) {
+ parsed.protocol = null;
+ }
+
+ return parsed;
+};