mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-13 02:20:03 -04:00
Create scripts/store/setters
This commit is contained in:
parent
21b8ce8731
commit
42d8a670d2
13 changed files with 156 additions and 0 deletions
7
scripts/store/setters/url.js
Normal file
7
scripts/store/setters/url.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
const normalize = require('normalize-url')
|
||||
|
||||
module.exports = function ({ url }) {
|
||||
const normalized = normalize(url, { stripWWW: false })
|
||||
|
||||
return decodeURIComponent(normalized).replace(/\s/g, '+')
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue