ef05583fba
* init some shared functions (videoHasWebchat, parseConfigUUIDs) * api/room: checking that video has live enabled * fix promise handling in initChat function * removing some 'use strict' that are no more necessary in typescript
17 lines
293 B
TypeScript
17 lines
293 B
TypeScript
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
|
|
}
|