mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
monorepo packages (#344)
This commit is contained in:
1
packages/common/bill/constants.ts
Normal file
1
packages/common/bill/constants.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const PRICE_SCALE = 100000;
|
9
packages/common/bill/index.ts
Normal file
9
packages/common/bill/index.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* 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));
|
||||
};
|
4
packages/common/package.json
Normal file
4
packages/common/package.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "@fastgpt/common",
|
||||
"version": "1.0.0"
|
||||
}
|
21
packages/common/tsconfig.json
Normal file
21
packages/common/tsconfig.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2015",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"baseUrl": "."
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.d.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
Reference in New Issue
Block a user