mirror of
https://github.com/euzu/tuliprox.git
synced 2026-10-21 23:32:39 +02:00
13 lines
301 B
TypeScript
13 lines
301 B
TypeScript
import ServerConfig from "../model/server-config";
|
|
|
|
const getTargetNames = (config: ServerConfig): string[] => {
|
|
return config?.sources.flatMap(s => s.targets)
|
|
.map(t => t.name).filter(n => "default" !== n) || [];
|
|
}
|
|
|
|
|
|
const ConfigUtils = {
|
|
getTargetNames
|
|
}
|
|
|
|
export default ConfigUtils; |