feat(v4): Add new contact details screen (#10504)

Co-authored-by: Pranav <pranavrajs@gmail.com>
This commit is contained in:
Sivin Varghese
2024-12-04 10:59:47 +05:30
committed by GitHub
parent d4b6f710bd
commit 769b7171f4
37 changed files with 1353 additions and 221 deletions

View File

@@ -23,3 +23,16 @@ export function useSnakeCase(payload) {
const unrefPayload = unref(payload);
return snakecaseKeys(unrefPayload);
}
/**
* Converts a string from snake_case to camelCase
* @param {string} str - String to convert (can contain letters, numbers, or both)
* Examples: 'hello_world', 'user_123', 'checkbox_2', 'test_string_99'
* @returns {string} Converted string in camelCase
* Examples: 'helloWorld', 'user123', 'checkbox2', 'testString99'
*/
export function toCamelCase(str) {
return str
.toLowerCase()
.replace(/_([a-z0-9])/g, (_, char) => char.toUpperCase());
}