Skip to content

Commit 8da1a28

Browse files
committed
Add documentation to formatDecimal function
1 parent 4518d9a commit 8da1a28

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

extensions/ql-vscode/src/pure/number.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
const numberFormatter = new Intl.NumberFormat('en-US');
66

7+
/**
8+
* Formats a number to be human-readable with decimal places and thousands separators.
9+
*
10+
* @param value The number to format.
11+
* @returns The formatted number. For example, "10,000", "1,000,000", or "1,000,000,000".
12+
*/
713
export function formatDecimal(value: number): string {
814
return numberFormatter.format(value);
915
}

0 commit comments

Comments
 (0)