metanum 1.3.0 → 2.0.0

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/package.json CHANGED
@@ -1,23 +1,32 @@
1
- {
2
- "name": "metanum",
3
- "version": "1.3.0",
4
- "description": "A javascript library that handles numbers as large as f_ε₀(9e15)",
5
- "main": "metanum.js",
6
- "scripts": {
7
- "test": "node test.js",
8
- "example": "node basic-usage.js"
9
- },
10
- "keywords": [
11
- "large-numbers",
12
- "hardy-hierarchy",
13
- "ordinal-arithmetic",
14
- "hyper-operations",
15
- "mathematics"
16
- ],
17
- "author": "dlsdl",
18
- "license": "MIT",
19
- "bugs": {
20
- "url": "https://github.com/dlsdl/metanum.js/issues"
21
- },
22
- "homepage": "https://github.com/dlsdl/metanum.js"
23
- }
1
+ {
2
+ "name": "metanum",
3
+ "version": "2.0.0",
4
+ "description": "A javascript library that handles numbers as large as f_ε₀(9e15)",
5
+ "main": "metanum.js",
6
+ "files": [
7
+ "metanum.js",
8
+ "format-metanum.js",
9
+ "test-interface.html",
10
+ "test_mixed.js",
11
+ "README.md",
12
+ "LICENSE"
13
+ ],
14
+ "scripts": {
15
+ "test": "node test.js",
16
+ "example": "node basic-usage.js"
17
+ },
18
+ "keywords": [
19
+ "large-numbers",
20
+ "hardy-hierarchy",
21
+ "ordinal-arithmetic",
22
+ "hyper-operations",
23
+ "mathematics"
24
+ ],
25
+ "author": "dlsdl",
26
+ "license": "MIT",
27
+ "bugs": {
28
+ "url": "https://github.com/dlsdl/metanum/issues"
29
+ },
30
+ "homepage": "https://github.com/dlsdl/metanum"
31
+ }
32
+
@@ -34,7 +34,7 @@
34
34
 
35
35
  <h2>test in console</h2>
36
36
 
37
- <button id="runTestBtn">运行 test_mixed.js</button>
37
+ <button id="runTestBtn">run test_mixed.js</button>
38
38
  <div id="consoleOutput" style="margin-top: 20px; padding: 10px; background-color: #f0f0f0; border-radius: 4px; min-height: 100px; font-family: monospace; font-size: 14px; white-space: pre-wrap;"></div>
39
39
 
40
40
  <script>
@@ -42,10 +42,10 @@
42
42
  const outputDiv = document.getElementById('consoleOutput');
43
43
  outputDiv.innerHTML = '';
44
44
 
45
- // 保存原始console.log
45
+ // save original console.log
46
46
  const originalLog = console.log;
47
47
 
48
- // 重写console.log以捕获输出
48
+ // rewrite console.log to output to the div
49
49
  console.log = function(...args) {
50
50
  originalLog.apply(console, args);
51
51
  const logEntry = document.createElement('div');
@@ -58,14 +58,14 @@
58
58
  outputDiv.appendChild(logEntry);
59
59
  };
60
60
 
61
- // 动态加载test_mixed.js
61
+ // load test_mixed.js
62
62
  const script = document.createElement('script');
63
63
  script.src = './test_mixed.js';
64
64
  script.onload = function() {
65
- console.log('test_mixed.js 加载完成');
65
+ console.log('test_mixed.js loaded');
66
66
  };
67
67
  script.onerror = function() {
68
- console.log('加载 test_mixed.js 失败');
68
+ console.log('Failed to load test_mixed.js');
69
69
  console.log = originalLog;
70
70
  };
71
71
  document.head.appendChild(script);