13 lines
442 B
TypeScript
13 lines
442 B
TypeScript
import { Platforms } from "@/meta/settings";
|
|
|
|
export const getEnabledPlatforms = ():string[] => {
|
|
if (process.env.DISABLED_PLATFORMS) {
|
|
const regex = /[ '\"]/g;
|
|
|
|
const disabledPlatforms: string[] = String(process.env.DISABLED_PLATFORMS).replace(regex, '').split(',')
|
|
|
|
return [...Object.values(Platforms)].filter(p => !disabledPlatforms.includes(p))
|
|
} else {
|
|
return [...Object.values(Platforms)]
|
|
}
|
|
} |