a-calc 3.0.0-beta.20260124.4 → 3.0.0-beta.20260128.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a-calc.versions.js +3 -3
- package/browser/index.js +2 -2
- package/calc.d.ts +10 -10
- package/cjs/index.js +2 -2
- package/es/index.js +2 -2
- package/mcp-server/src/index.js +3 -3
- package/package.json +127 -127
package/mcp-server/src/index.js
CHANGED
|
@@ -155,7 +155,7 @@ const TOOLS = [
|
|
|
155
155
|
- +: 显示正号 (如 + → "+100")
|
|
156
156
|
- !n: 返回数字类型
|
|
157
157
|
- !v: 交易量缩写 (如 !v → "1.23M")
|
|
158
|
-
- !t:
|
|
158
|
+
- !t:en/eu/indian/wan: 千分位预设
|
|
159
159
|
|
|
160
160
|
快速示例:
|
|
161
161
|
- fmt(100, "=2") → "100.00"
|
|
@@ -554,10 +554,10 @@ calc("1.124 | ~+=2") // "1.13"
|
|
|
554
554
|
## 千分位
|
|
555
555
|
|
|
556
556
|
- \`,\` - 千分位分隔符
|
|
557
|
-
- \`!t:
|
|
557
|
+
- \`!t:en\` - 英文/国际千分位 (1,234.56)
|
|
558
558
|
- \`!t:eu\` - 欧式千分位 (1.234,56)
|
|
559
559
|
- \`!t:indian\` - 印度式千分位 (12,34,567)
|
|
560
|
-
- \`!t:
|
|
560
|
+
- \`!t:wan\` - 万进制分隔 (1234,5678)
|
|
561
561
|
|
|
562
562
|
**示例:**
|
|
563
563
|
\`\`\`javascript
|
package/package.json
CHANGED
|
@@ -1,132 +1,132 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
"name": "a-calc",
|
|
3
|
+
"version": "3.0.0-beta.20260128.1",
|
|
4
|
+
"description": "A very powerful and easy-to-use number precision calculation and formatting library.",
|
|
5
|
+
"main": "./cjs/index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./calc.d.ts",
|
|
9
|
+
"import": "./es/index.js",
|
|
10
|
+
"require": "./cjs/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./es": {
|
|
13
|
+
"types": "./calc.d.ts",
|
|
14
|
+
"import": "./es/index.js",
|
|
15
|
+
"default": "./es/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./cjs": {
|
|
18
|
+
"types": "./calc.d.ts",
|
|
19
|
+
"require": "./cjs/index.js",
|
|
20
|
+
"default": "./cjs/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./mcp-server/src/index.js": "./mcp-server/src/index.js"
|
|
11
23
|
},
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
24
|
+
"browser": "browser/index.js",
|
|
25
|
+
"module": "es/index.js",
|
|
26
|
+
"types": "calc.d.ts",
|
|
27
|
+
"typings": "calc.d.ts",
|
|
28
|
+
"scripts": {
|
|
29
|
+
"dev": "rollup -c --environment build:dev",
|
|
30
|
+
"dev:w": "rollup -c -w --environment build:dev",
|
|
31
|
+
"build": "run-p gen:version build-test",
|
|
32
|
+
"build-test": "rollup -c --environment build:build & npm run test",
|
|
33
|
+
"build-only": "rollup -c --environment build:build",
|
|
34
|
+
"build:w": "rollup -c -w --environment build:build",
|
|
35
|
+
"build:docs": "pnpm install --frozen-lockfile=false && vitepress build docs",
|
|
36
|
+
"test": "vitest run",
|
|
37
|
+
"test:type": "tsc --noEmit type-check.ts",
|
|
38
|
+
"gen:version": "node gen_version_info.cjs",
|
|
39
|
+
"docs:dev": "vitepress dev docs",
|
|
40
|
+
"docs:build": "vitepress build docs",
|
|
41
|
+
"docs:preview": "vitepress preview docs"
|
|
16
42
|
},
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
"require": "./cjs/index.js",
|
|
20
|
-
"default": "./cjs/index.js"
|
|
43
|
+
"bin": {
|
|
44
|
+
"a-calc-mcp": "./mcp-server/src/index.js"
|
|
21
45
|
},
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
"vitepress": "^1.6.4",
|
|
109
|
-
"vitest": "^2.1.0",
|
|
110
|
-
"vue": "^3.5.25",
|
|
111
|
-
"@uiw/codemirror-themes-all": "^4.25.4"
|
|
112
|
-
},
|
|
113
|
-
"dependencies": {
|
|
114
|
-
"typescript-treasure": "0.0.9",
|
|
115
|
-
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
116
|
-
},
|
|
117
|
-
"scripts": {
|
|
118
|
-
"dev": "rollup -c --environment build:dev",
|
|
119
|
-
"dev:w": "rollup -c -w --environment build:dev",
|
|
120
|
-
"build": "run-p gen:version build-test",
|
|
121
|
-
"build-test": "rollup -c --environment build:build & npm run test",
|
|
122
|
-
"build-only": "rollup -c --environment build:build",
|
|
123
|
-
"build:w": "rollup -c -w --environment build:build",
|
|
124
|
-
"build:docs": "pnpm install --frozen-lockfile=false && vitepress build docs",
|
|
125
|
-
"test": "vitest run",
|
|
126
|
-
"test:type": "tsc --noEmit type-check.ts",
|
|
127
|
-
"gen:version": "node gen_version_info.cjs",
|
|
128
|
-
"docs:dev": "vitepress dev docs",
|
|
129
|
-
"docs:build": "vitepress build docs",
|
|
130
|
-
"docs:preview": "vitepress preview docs"
|
|
131
|
-
}
|
|
46
|
+
"files": [
|
|
47
|
+
"es",
|
|
48
|
+
"cjs",
|
|
49
|
+
"browser",
|
|
50
|
+
"calc.d.ts",
|
|
51
|
+
"a-calc.versions.js",
|
|
52
|
+
"mcp-server/src",
|
|
53
|
+
"mcp-server/package.json",
|
|
54
|
+
"mcp-server/README.md"
|
|
55
|
+
],
|
|
56
|
+
"repository": {
|
|
57
|
+
"type": "git",
|
|
58
|
+
"url": "git+https://github.com/Autumn-one/a-calc-old.git"
|
|
59
|
+
},
|
|
60
|
+
"keywords": [
|
|
61
|
+
"decimal",
|
|
62
|
+
"math",
|
|
63
|
+
"expression",
|
|
64
|
+
"evaluator",
|
|
65
|
+
"arbitrary",
|
|
66
|
+
"precision",
|
|
67
|
+
"arithmetic",
|
|
68
|
+
"big",
|
|
69
|
+
"number",
|
|
70
|
+
"parser",
|
|
71
|
+
"float",
|
|
72
|
+
"biginteger",
|
|
73
|
+
"bigdecimal",
|
|
74
|
+
"bignumber",
|
|
75
|
+
"bigint",
|
|
76
|
+
"bignum",
|
|
77
|
+
"a-calc",
|
|
78
|
+
"四则运算",
|
|
79
|
+
"数学",
|
|
80
|
+
"运算",
|
|
81
|
+
"浮点数",
|
|
82
|
+
"精度",
|
|
83
|
+
"金融计算"
|
|
84
|
+
],
|
|
85
|
+
"author": "Autumn",
|
|
86
|
+
"bugs": {
|
|
87
|
+
"url": "https://github.com/Autumn-one/a-calc-old/issues"
|
|
88
|
+
},
|
|
89
|
+
"homepage": "https://github.com/Autumn-one/a-calc-old#readme",
|
|
90
|
+
"devDependencies": {
|
|
91
|
+
"@babel/core": "^7.21.4",
|
|
92
|
+
"@babel/preset-env": "^7.21.4",
|
|
93
|
+
"@codemirror/commands": "^6.10.1",
|
|
94
|
+
"@codemirror/lang-javascript": "^6.2.4",
|
|
95
|
+
"@codemirror/language": "^6.12.1",
|
|
96
|
+
"@codemirror/state": "^6.5.3",
|
|
97
|
+
"@codemirror/theme-one-dark": "^6.1.3",
|
|
98
|
+
"@codemirror/view": "^6.39.8",
|
|
99
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
100
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
101
|
+
"@rollup/plugin-json": "^6.0.1",
|
|
102
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
103
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
104
|
+
"@vitest/coverage-v8": "^2.1.9",
|
|
105
|
+
"a-calc": "^2.2.15",
|
|
106
|
+
"benchmark": "^2.1.4",
|
|
107
|
+
"bignumber.js": "^9.3.1",
|
|
108
|
+
"codemirror": "^6.0.2",
|
|
109
|
+
"cross-env": "^7.0.3",
|
|
110
|
+
"decimal.js": "^10.6.0",
|
|
111
|
+
"fast-deep-equal": "^3.1.3",
|
|
112
|
+
"glob": "^8.1.0",
|
|
113
|
+
"husky": "^9.1.7",
|
|
114
|
+
"json-stringify-safe": "^5.0.1",
|
|
115
|
+
"lodash-es": "^4.17.21",
|
|
116
|
+
"math-expression-evaluator": "^2.0.7",
|
|
117
|
+
"mathjs": "^15.1.0",
|
|
118
|
+
"npm-run-all": "^4.1.5",
|
|
119
|
+
"rollup": "^4.6.0",
|
|
120
|
+
"rollup-plugin-livereload": "^2.0.5",
|
|
121
|
+
"rollup-plugin-serve": "^1.1.0",
|
|
122
|
+
"typescript": "^5.1.6",
|
|
123
|
+
"vitepress": "^1.6.4",
|
|
124
|
+
"vitest": "^2.1.0",
|
|
125
|
+
"vue": "^3.5.25",
|
|
126
|
+
"@uiw/codemirror-themes-all": "^4.25.4"
|
|
127
|
+
},
|
|
128
|
+
"dependencies": {
|
|
129
|
+
"typescript-treasure": "0.0.9",
|
|
130
|
+
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
131
|
+
}
|
|
132
132
|
}
|