mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-06-24 13:39:27 +08:00
Vidya reddy/prettier code (#203)
This commit is contained in:
+8
-8
@@ -1,7 +1,7 @@
|
||||
export enum Action {
|
||||
DEPLOY = "deploy",
|
||||
PROMOTE = "promote",
|
||||
REJECT = "reject",
|
||||
DEPLOY = 'deploy',
|
||||
PROMOTE = 'promote',
|
||||
REJECT = 'reject'
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -10,8 +10,8 @@ export enum Action {
|
||||
* @returns The Action enum or undefined if it can't be parsed
|
||||
*/
|
||||
export const parseAction = (str: string): Action | undefined =>
|
||||
Action[
|
||||
Object.keys(Action).filter(
|
||||
(k) => Action[k].toString().toLowerCase() === str.toLowerCase()
|
||||
)[0] as keyof typeof Action
|
||||
];
|
||||
Action[
|
||||
Object.keys(Action).filter(
|
||||
(k) => Action[k].toString().toLowerCase() === str.toLowerCase()
|
||||
)[0] as keyof typeof Action
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user