diff options
Diffstat (limited to 'deps/npm/node_modules/url-parse-lax/index.js')
-rw-r--r-- | deps/npm/node_modules/url-parse-lax/index.js | 14 |
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; +}; |