iptv/scripts/store/setters/name.js
2021-12-12 07:12:06 +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(' ')
}