@danielsimonjr/mathts-expression 0.8.2 → 0.9.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/dist/index.js +14 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5,7 +5,11 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
-
|
|
8
|
+
try {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
} catch (e) {
|
|
11
|
+
throw mod = 0, e;
|
|
12
|
+
}
|
|
9
13
|
};
|
|
10
14
|
var __copyProps = (to, from, except, desc) => {
|
|
11
15
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -7341,6 +7345,15 @@ function compileSymbolNode(node, math, argNames) {
|
|
|
7341
7345
|
return math[name47];
|
|
7342
7346
|
};
|
|
7343
7347
|
}
|
|
7348
|
+
const unitCtor = math.Unit;
|
|
7349
|
+
if (typeof unitCtor === "function" && typeof unitCtor.isValuelessUnit === "function" && unitCtor.isValuelessUnit(name47)) {
|
|
7350
|
+
return function evalUnitSymbol(scope) {
|
|
7351
|
+
if (scope.has(name47)) {
|
|
7352
|
+
return scope.get(name47);
|
|
7353
|
+
}
|
|
7354
|
+
return new unitCtor(null, name47);
|
|
7355
|
+
};
|
|
7356
|
+
}
|
|
7344
7357
|
return function evalSymbolNode(scope) {
|
|
7345
7358
|
if (scope.has(name47)) {
|
|
7346
7359
|
return scope.get(name47);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danielsimonjr/mathts-expression",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Expression parser and evaluator for MathTS",
|
|
5
5
|
"author": "Daniel Simon Jr.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"build:prod": "tsup src/index.ts --format esm --clean --minify --treeshake && tsc -p tsconfig.dts.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@danielsimonjr/mathts-core": "^0.
|
|
34
|
+
"@danielsimonjr/mathts-core": "^0.16.0",
|
|
35
35
|
"typed-function": "^4.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|