mirror of
https://github.com/langgenius/dify.git
synced 2026-07-23 03:58:31 +08:00
4 lines
181 B
TypeScript
4 lines
181 B
TypeScript
export const getRemainingCredits = (total: number, used: number) => Math.max(total - used, 0)
|
|
|
|
export const formatCredits = (value: number) => new Intl.NumberFormat().format(value)
|