Skip to content

Commit 513b1f4

Browse files
code cleanup: remove commented out function (#246)
1 parent c1b3412 commit 513b1f4

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

frontend/app/utils/string-utils.ts

+1-15
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,8 @@
11
/**
22
* Strips formatting from a string representing a formatted decimal
33
* @param input string represenation of a formatted decimal (examples: en:"1,234.56", fr:"1 234,56")
4-
* @param lang Format language (en or fr)
54
* @returns string representation of the decimal without formatting (examples: "1234.56")
6-
*
7-
export function removeNumericFormatting(input: string, lang: Language): string {
8-
switch (lang) {
9-
case 'en': {
10-
const output = input.replaceAll(',', '');
11-
return output;
12-
}
13-
case 'fr': {
14-
const output = input.replaceAll(' ', '').replaceAll(',', '.');
15-
return output;
16-
}
17-
}
18-
}
19-
*/
5+
*/
206
export function removeNumericFormatting(input: string | undefined): string {
217
if (input === undefined) return '';
228

0 commit comments

Comments
 (0)