projects
/
dotfiles
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
.gitignore added
[dotfiles/.git]
/
.config
/
coc
/
extensions
/
node_modules
/
coc-prettier
/
node_modules
/
url-parse-lax
/
index.js
1
'use strict';
2
var url = require('url');
3
var prependHttp = require('prepend-http');
4
5
module.exports = function (x) {
6
var withProtocol = prependHttp(x);
7
var parsed = url.parse(withProtocol);
8
9
if (withProtocol !== x) {
10
parsed.protocol = null;
11
}
12
13
return parsed;
14
};