Skip to content

Commit

Permalink
Merge pull request #26154 from software-mansion-labs/ts-migration/num…
Browse files Browse the repository at this point in the history
…ber-format-utils
  • Loading branch information
thienlnam authored Sep 5, 2023
2 parents 3acb7cd + 78eaaab commit 1bdc5ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/libs/NumberFormatUtils.js

This file was deleted.

9 changes: 9 additions & 0 deletions src/libs/NumberFormatUtils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function format(locale: string, number: number, options?: Intl.NumberFormatOptions): string {
return new Intl.NumberFormat(locale, options).format(number);
}

function formatToParts(locale: string, number: number, options?: Intl.NumberFormatOptions): Intl.NumberFormatPart[] {
return new Intl.NumberFormat(locale, options).formatToParts(number);
}

export {format, formatToParts};

0 comments on commit 1bdc5ac

Please sign in to comment.