peertube-plugin-livechat/shared/lib/config.ts

17 lines
293 B
TypeScript
Raw Normal View History

function parseConfigUUIDs (s: string): string[] {
if (!s) {
return []
}
let a = s.split('\n')
a = a.map(line => {
return line.replace(/#.*$/, '')
.replace(/^\s+/, '')
.replace(/\s+$/, '')
})
return a.filter(line => line !== '')
}
export {
parseConfigUUIDs
}