-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support for S3 buckets defined in "provider:"
- Loading branch information
Showing
3 changed files
with
89 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export const capitalizeKeys = (obj: { | ||
[key: string]: any; | ||
}): { [key: string]: any } => { | ||
if (!obj || typeof obj !== "object") return obj; | ||
|
||
return Object.entries(obj).reduce((acc, [key, value]) => { | ||
acc[capitalize(key)] = value; | ||
return acc; | ||
}, {} as { [key: string]: any }); | ||
}; | ||
|
||
const capitalize = (str: string): string => { | ||
// capitalize the first letter of str | ||
return str.charAt(0).toUpperCase() + str.slice(1); | ||
}; |