iptv/scripts/store/setters/name.js

11 lines
207 B
JavaScript
Raw Normal View History

2021-12-12 05:12:06 +01:00
module.exports = function ({ title }) {
return title
.trim()
.split(' ')
.map(s => s.trim())
.filter(s => {
return !/\[|\]/i.test(s) && !/\((\d+)P\)/i.test(s)
})
.join(' ')
}