Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getGeneratorForPlatform (platform: string) : ContainerGenerator {
switch (platform) {
case 'android': return new AndroidGenerator()
case 'ios': return new IosGenerator()
default: throw new Error(`Unsupported platform : ${platform}`)
}
}