mirror of
https://github.com/iptv-org/iptv.git
synced 2024-09-06 00:02:24 +02:00
12 lines
241 B
JavaScript
12 lines
241 B
JavaScript
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
|