mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-11 17:40:03 -04:00
11 lines
241 B
JavaScript
11 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
|