Skip to content

Commit

Permalink
fix:
Browse files Browse the repository at this point in the history
  • Loading branch information
Monkeychip committed Jan 9, 2025
1 parent 1efd457 commit dcea9ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/app/helpers/string-to-camel.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function stringToCamelCase(str) {
if (Array.isArray(str)) {
return str.map((s) => {
assert(`must pass in a string or array of strings`, typeof s === 'string');
// lower case the entire string to handle situations like IAM Endpoint -> iamEndpoint instead of
// lower case the entire string to handle situations like IAM Endpoint -> iamEndpoint instead of iAMEndpoint
s = s.toLowerCase();
return s
.replace(/(?:^\w|[A-Z]|\b\w)/g, function (word, index) {
Expand All @@ -23,7 +23,7 @@ export function stringToCamelCase(str) {
.replace(/\s+/g, '');
});
} else {
// lower case the entire string to handle situations like IAM Endpoint -> iamEndpoint instead of
// lower case the entire string to handle situations like IAM Endpoint -> iamEndpoint instead of iAMEndpoint
assert(`must pass in a string or array of strings`, typeof str === 'string');
str = str.toLowerCase();
return str
Expand Down

0 comments on commit dcea9ff

Please sign in to comment.