biofriction-wp-theme/node_modules/url-parse-lax/index.js

15 lines
268 B
JavaScript
Raw Permalink Normal View History

2021-10-26 14:18:09 +02:00
'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;
};