iptv/scripts/store/setters/channel_name.js
2022-02-07 06:04:41 +03:00

11 lines
207 B
JavaScript

module.exports = function ({ title }) {
return title
.trim()
.split(' ')
.map(s => s.trim())
.filter(s => {
return !/\[|\]/i.test(s) && !/\((\d+)P\)/i.test(s)
})
.join(' ')
}