mirror of https://github.com/iptv-org/iptv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
241 B
JavaScript
12 lines
241 B
JavaScript
2 years ago
|
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
|