1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = normalize;
|
7 | function normalize(url) {
|
8 | var protocol = (url.match(/(http|https)\:\/\//) || [])[1];
|
9 | if (/\:443$/.test(url)) {
|
10 | protocol = protocol || 'https';
|
11 | } else {
|
12 | protocol = 'http';
|
13 | }
|
14 | return protocol + '://' + url.replace(/(\:80|\:443)$/, '');
|
15 | }
|
16 | module.exports = exports['default']; |
\ | No newline at end of file |