iptv/scripts/store/setters/url.js

8 lines
202 B
JavaScript
Raw Normal View History

2021-12-12 05:12:06 +01:00
const normalize = require('normalize-url')
module.exports = function ({ url }) {
const normalized = normalize(url, { stripWWW: false })
return decodeURIComponent(normalized).replace(/\s/g, '+')
}