Create url.js

pull/12654/head
Aleksandr Statciuk 2 years ago
parent 5b58d1bbde
commit fa4b1a58f3

@ -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