-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Adds findAll finder to function
- Loading branch information
1 parent
ac996e0
commit 3e4d382
Showing
7 changed files
with
539 additions
and
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
const pluralizationMap = { | ||
Avatar: "Avatars", | ||
ChatBubble: "ChatBubbles", | ||
LoadingBar: "LoadingBars", | ||
}; | ||
|
||
function pluralizeComponentName(componentName) { | ||
if (!(componentName in pluralizationMap)) { | ||
throw new Error(`Could not find the plural case for ${componentName}.`); | ||
} | ||
|
||
return pluralizationMap[componentName]; | ||
} | ||
|
||
export { pluralizeComponentName }; |
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
Oops, something went wrong.