mirror of https://github.com/iptv-org/iptv
Create url.js
parent
9969c92297
commit
0ff886686e
@ -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…
Reference in New Issue