@weborigami/origami 0.0.66 → 0.0.67-beta.2
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/exports/exports.js +1 -0
- package/package.json +4 -4
- package/src/builtins/@math.js +17 -0
package/exports/exports.js
CHANGED
|
@@ -56,6 +56,7 @@ export { default as log } from "../src/builtins/@log.js";
|
|
|
56
56
|
export { default as map } from "../src/builtins/@map.js";
|
|
57
57
|
export { default as mapFn } from "../src/builtins/@mapFn.js";
|
|
58
58
|
export { default as match } from "../src/builtins/@match.js";
|
|
59
|
+
export * from "../src/builtins/@math.js";
|
|
59
60
|
export { default as mdHtml } from "../src/builtins/@mdHtml.js";
|
|
60
61
|
export { default as mdTree } from "../src/builtins/@mdTree.js";
|
|
61
62
|
export { default as merge } from "../src/builtins/@merge.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weborigami/origami",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.67-beta.2",
|
|
4
4
|
"description": "Web Origami language, CLI, framework, and server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"typescript": "5.6.2"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@weborigami/async-tree": "0.0.
|
|
21
|
-
"@weborigami/language": "0.0.
|
|
22
|
-
"@weborigami/types": "0.0.
|
|
20
|
+
"@weborigami/async-tree": "0.0.67-beta.2",
|
|
21
|
+
"@weborigami/language": "0.0.67-beta.2",
|
|
22
|
+
"@weborigami/types": "0.0.67-beta.2",
|
|
23
23
|
"exif-parser": "0.1.12",
|
|
24
24
|
"graphviz-wasm": "3.0.2",
|
|
25
25
|
"highlight.js": "11.10.0",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function add(...args) {
|
|
2
|
+
const numbers = args.map((arg) => Number(arg));
|
|
3
|
+
return numbers.reduce((acc, val) => acc + val, 0);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export function subtract(a, b) {
|
|
7
|
+
return Number(a) - Number(b);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function multiply(...args) {
|
|
11
|
+
const numbers = args.map((arg) => Number(arg));
|
|
12
|
+
return numbers.reduce((acc, val) => acc * val, 1);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function divide(a, b) {
|
|
16
|
+
return Number(a) / Number(b);
|
|
17
|
+
}
|