mirror of
https://github.com/iptv-org/iptv
synced 2025-12-16 02:16:47 -05:00
Create url.js
This commit is contained in:
11
scripts/core/url.js
Normal file
11
scripts/core/url.js
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user