mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-06-23 04:59:26 +08:00
Vidya reddy/prettier code (#203)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export enum DeploymentStrategy {
|
||||
CANARY = "canary",
|
||||
BLUE_GREEN = "blue-green",
|
||||
CANARY = 'canary',
|
||||
BLUE_GREEN = 'blue-green'
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -9,11 +9,11 @@ export enum DeploymentStrategy {
|
||||
* @returns The DeploymentStrategy enum or undefined if it can't be parsed
|
||||
*/
|
||||
export const parseDeploymentStrategy = (
|
||||
str: string
|
||||
str: string
|
||||
): DeploymentStrategy | undefined =>
|
||||
DeploymentStrategy[
|
||||
Object.keys(DeploymentStrategy).filter(
|
||||
(k) =>
|
||||
DeploymentStrategy[k].toString().toLowerCase() === str.toLowerCase()
|
||||
)[0] as keyof typeof DeploymentStrategy
|
||||
];
|
||||
DeploymentStrategy[
|
||||
Object.keys(DeploymentStrategy).filter(
|
||||
(k) =>
|
||||
DeploymentStrategy[k].toString().toLowerCase() === str.toLowerCase()
|
||||
)[0] as keyof typeof DeploymentStrategy
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user