mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-21 11:43:56 +00:00
10 lines
237 B
TypeScript
10 lines
237 B
TypeScript
/* bill common */
|
|
import { PRICE_SCALE } from './constants';
|
|
|
|
/**
|
|
* dataset price / PRICE_SCALE = real price
|
|
*/
|
|
export const formatPrice = (val = 0, multiple = 1) => {
|
|
return Number(((val / PRICE_SCALE) * multiple).toFixed(10));
|
|
};
|