Create url.js

pull/24814/head
Aleksandr Statciuk 3 years ago
parent 7770dd6b27
commit 50b60ad7b4

@ -0,0 +1,11 @@
const normalize = require('normalize-url')
const url = {}
url.normalize = function (string) {
const normalized = normalize(string, { stripWWW: false })
return decodeURIComponent(normalized).replace(/\s/g, '+')
}
module.exports = url
Loading…
Cancel
Save