chore(framework): Move feature flags related resources and cleanup (#8297)
**What** cleanup and move the feature flag related resources to manage them. It also include some refactoring around loading and registering the flag as well as not relying on the `glob` package anymore plus some reorganization of the code itself FIXES FRMW-2625
This commit is contained in:
@@ -25,6 +25,7 @@ export * from "./get-set-difference"
|
||||
export * from "./graceful-shutdown-server"
|
||||
export * from "./group-by"
|
||||
export * from "./handle-postgres-database-error"
|
||||
export * from "./is-truthy"
|
||||
export * from "./is-big-number"
|
||||
export * from "./is-boolean"
|
||||
export * from "./is-date"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Return true if the value is truthy and otherwise false
|
||||
* @param val
|
||||
*/
|
||||
export function isTruthy(val: string | boolean | undefined): boolean {
|
||||
if (typeof val === "string") {
|
||||
return val.toLowerCase() === "true"
|
||||
}
|
||||
return !!val
|
||||
}
|
||||
Reference in New Issue
Block a user