@danielsimonjr/mathts-expression 0.8.0 → 0.8.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.
Files changed (52) hide show
  1. package/README.md +42 -42
  2. package/dist/index.js +276 -347
  3. package/dist/node/AccessorNode.d.ts +121 -132
  4. package/dist/node/AccessorNode.d.ts.map +1 -1
  5. package/dist/node/ArrayNode.d.ts +25 -30
  6. package/dist/node/ArrayNode.d.ts.map +1 -1
  7. package/dist/node/AssignmentNode.d.ts +19 -32
  8. package/dist/node/AssignmentNode.d.ts.map +1 -1
  9. package/dist/node/BlockNode.d.ts +121 -126
  10. package/dist/node/BlockNode.d.ts.map +1 -1
  11. package/dist/node/ConditionalNode.d.ts +25 -30
  12. package/dist/node/ConditionalNode.d.ts.map +1 -1
  13. package/dist/node/ConstantNode.d.ts +93 -100
  14. package/dist/node/ConstantNode.d.ts.map +1 -1
  15. package/dist/node/FunctionAssignmentNode.d.ts +93 -98
  16. package/dist/node/FunctionAssignmentNode.d.ts.map +1 -1
  17. package/dist/node/FunctionNode.d.ts +32 -43
  18. package/dist/node/FunctionNode.d.ts.map +1 -1
  19. package/dist/node/IndexNode.d.ts +949 -72
  20. package/dist/node/IndexNode.d.ts.map +1 -1
  21. package/dist/node/Node.d.ts +43 -39
  22. package/dist/node/Node.d.ts.map +1 -1
  23. package/dist/node/ObjectNode.d.ts +947 -56
  24. package/dist/node/ObjectNode.d.ts.map +1 -1
  25. package/dist/node/OperatorNode.d.ts +955 -79
  26. package/dist/node/OperatorNode.d.ts.map +1 -1
  27. package/dist/node/ParenthesisNode.d.ts +881 -63
  28. package/dist/node/ParenthesisNode.d.ts.map +1 -1
  29. package/dist/node/RangeNode.d.ts +955 -71
  30. package/dist/node/RangeNode.d.ts.map +1 -1
  31. package/dist/node/RelationalNode.d.ts +947 -61
  32. package/dist/node/RelationalNode.d.ts.map +1 -1
  33. package/dist/node/SymbolNode.d.ts +942 -43
  34. package/dist/node/SymbolNode.d.ts.map +1 -1
  35. package/dist/node/utils/access.d.ts +8 -1
  36. package/dist/node/utils/access.d.ts.map +1 -1
  37. package/dist/node/utils/assign.d.ts +9 -1
  38. package/dist/node/utils/assign.d.ts.map +1 -1
  39. package/dist/node/utils/stringSubset.d.ts +8 -8
  40. package/dist/operators.d.ts +12 -15
  41. package/dist/operators.d.ts.map +1 -1
  42. package/dist/parse.d.ts +2 -0
  43. package/dist/parse.d.ts.map +1 -1
  44. package/dist/transform/utils/dimToZeroBase.d.ts +4 -0
  45. package/dist/transform/utils/dimToZeroBase.d.ts.map +1 -1
  46. package/dist/types.d.ts +8 -0
  47. package/dist/types.d.ts.map +1 -1
  48. package/dist/utils/is.d.ts +275 -3
  49. package/dist/utils/is.d.ts.map +1 -1
  50. package/dist/utils/latex.d.ts +12 -0
  51. package/dist/utils/latex.d.ts.map +1 -1
  52. package/package.json +59 -59
@@ -48,6 +48,66 @@ export declare const createBlockNode: import("../utils/factory.js").FactoryFunct
48
48
  getIdentifier(): string;
49
49
  getContent(): /*elided*/ any;
50
50
  };
51
+ blocks: BlockItem[];
52
+ get type(): string;
53
+ get isBlockNode(): boolean;
54
+ /**
55
+ * Compile a node into a JavaScript function.
56
+ * This basically pre-calculates as much as possible and only leaves open
57
+ * calculations which depend on a dynamic scope with variables.
58
+ * @param math - Math.js namespace with functions and constants.
59
+ * @param argNames - An object with argument names as key and `true`
60
+ * as value. Used in the SymbolNode to optimize
61
+ * for arguments from user assigned functions
62
+ * (see FunctionAssignmentNode) or special symbols
63
+ * like `end` (see IndexNode).
64
+ * @returns Returns a function which can be called like:
65
+ * evalNode(scope: Object, args: Object, context: *)
66
+ */
67
+ _compile(math: Record<string, unknown>, argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
68
+ /**
69
+ * Execute a callback for each of the child blocks of this node
70
+ * @param callback
71
+ */
72
+ forEach(callback: (child: MathNode, path: string, parent: MathNode) => void): void;
73
+ /**
74
+ * Create a new BlockNode whose children are the results of calling
75
+ * the provided callback function for each child of the original node.
76
+ * @param callback
77
+ * @returns Returns a transformed copy of the node
78
+ */
79
+ map(callback: (child: MathNode, path: string, parent: MathNode) => MathNode): /*elided*/ any;
80
+ /**
81
+ * Create a clone of this node, a shallow copy
82
+ */
83
+ clone(): /*elided*/ any;
84
+ /**
85
+ * Get string representation
86
+ * @param options
87
+ * @returns str
88
+ * @override
89
+ */
90
+ _toString(options?: StringOptions): string;
91
+ /**
92
+ * Get a JSON representation of the node
93
+ */
94
+ toJSON(): {
95
+ mathjs: string;
96
+ blocks: BlockItem[];
97
+ };
98
+ /**
99
+ * Get HTML representation
100
+ * @param options
101
+ * @returns str
102
+ * @override
103
+ */
104
+ _toHTML(options?: StringOptions): string;
105
+ /**
106
+ * Get LaTeX representation
107
+ * @param options
108
+ * @returns str
109
+ */
110
+ _toTex(options?: StringOptions): string;
51
111
  traverse(callback: (node: {
52
112
  get type(): string;
53
113
  get isNode(): boolean;
@@ -115,68 +175,6 @@ export declare const createBlockNode: import("../utils/factory.js").FactoryFunct
115
175
  getIdentifier(): string;
116
176
  getContent(): any;
117
177
  } | null) => void): void;
118
- blocks: BlockItem[];
119
- get type(): string;
120
- get isBlockNode(): boolean;
121
- /**
122
- * Compile a node into a JavaScript function.
123
- * This basically pre-calculates as much as possible and only leaves open
124
- * calculations which depend on a dynamic scope with variables.
125
- * @param {Object} math Math.js namespace with functions and constants.
126
- * @param {Object} argNames An object with argument names as key and `true`
127
- * as value. Used in the SymbolNode to optimize
128
- * for arguments from user assigned functions
129
- * (see FunctionAssignmentNode) or special symbols
130
- * like `end` (see IndexNode).
131
- * @return {function} Returns a function which can be called like:
132
- * evalNode(scope: Object, args: Object, context: *)
133
- */
134
- _compile(math: Record<string, unknown>, argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
135
- /**
136
- * Execute a callback for each of the child blocks of this node
137
- * @param {function(child: Node, path: string, parent: Node)} callback
138
- */
139
- forEach(callback: (child: MathNode, path: string, parent: MathNode) => void): void;
140
- /**
141
- * Create a new BlockNode whose children are the results of calling
142
- * the provided callback function for each child of the original node.
143
- * @param {function(child: Node, path: string, parent: Node): Node} callback
144
- * @returns {BlockNode} Returns a transformed copy of the node
145
- */
146
- map(callback: (child: MathNode, path: string, parent: MathNode) => MathNode): /*elided*/ any;
147
- /**
148
- * Create a clone of this node, a shallow copy
149
- * @return {BlockNode}
150
- */
151
- clone(): /*elided*/ any;
152
- /**
153
- * Get string representation
154
- * @param {Object} options
155
- * @return {string} str
156
- * @override
157
- */
158
- _toString(options?: StringOptions): string;
159
- /**
160
- * Get a JSON representation of the node
161
- * @returns {Object}
162
- */
163
- toJSON(): {
164
- mathjs: string;
165
- blocks: BlockItem[];
166
- };
167
- /**
168
- * Get HTML representation
169
- * @param {Object} options
170
- * @return {string} str
171
- * @override
172
- */
173
- _toHTML(options?: StringOptions): string;
174
- /**
175
- * Get LaTeX representation
176
- * @param {Object} options
177
- * @return {string} str
178
- */
179
- _toTex(options?: StringOptions): string;
180
178
  transform(callback: (node: {
181
179
  get type(): string;
182
180
  get isNode(): boolean;
@@ -529,11 +527,10 @@ export declare const createBlockNode: import("../utils/factory.js").FactoryFunct
529
527
  name: string;
530
528
  /**
531
529
  * Instantiate an BlockNode from its JSON representation
532
- * @param {Object} json
530
+ * @param json
533
531
  * An object structured like
534
532
  * `{"mathjs": "BlockNode", blocks: [{node: ..., visible: false}, ...]}`,
535
533
  * where mathjs is optional
536
- * @returns {BlockNode}
537
534
  */
538
535
  fromJSON(json: {
539
536
  blocks: Array<{
@@ -578,6 +575,66 @@ export declare const createBlockNode: import("../utils/factory.js").FactoryFunct
578
575
  getIdentifier(): string;
579
576
  getContent(): /*elided*/ any;
580
577
  };
578
+ blocks: BlockItem[];
579
+ get type(): string;
580
+ get isBlockNode(): boolean;
581
+ /**
582
+ * Compile a node into a JavaScript function.
583
+ * This basically pre-calculates as much as possible and only leaves open
584
+ * calculations which depend on a dynamic scope with variables.
585
+ * @param math - Math.js namespace with functions and constants.
586
+ * @param argNames - An object with argument names as key and `true`
587
+ * as value. Used in the SymbolNode to optimize
588
+ * for arguments from user assigned functions
589
+ * (see FunctionAssignmentNode) or special symbols
590
+ * like `end` (see IndexNode).
591
+ * @returns Returns a function which can be called like:
592
+ * evalNode(scope: Object, args: Object, context: *)
593
+ */
594
+ _compile(math: Record<string, unknown>, argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
595
+ /**
596
+ * Execute a callback for each of the child blocks of this node
597
+ * @param callback
598
+ */
599
+ forEach(callback: (child: MathNode, path: string, parent: MathNode) => void): void;
600
+ /**
601
+ * Create a new BlockNode whose children are the results of calling
602
+ * the provided callback function for each child of the original node.
603
+ * @param callback
604
+ * @returns Returns a transformed copy of the node
605
+ */
606
+ map(callback: (child: MathNode, path: string, parent: MathNode) => MathNode): /*elided*/ any;
607
+ /**
608
+ * Create a clone of this node, a shallow copy
609
+ */
610
+ clone(): /*elided*/ any;
611
+ /**
612
+ * Get string representation
613
+ * @param options
614
+ * @returns str
615
+ * @override
616
+ */
617
+ _toString(options?: StringOptions): string;
618
+ /**
619
+ * Get a JSON representation of the node
620
+ */
621
+ toJSON(): {
622
+ mathjs: string;
623
+ blocks: BlockItem[];
624
+ };
625
+ /**
626
+ * Get HTML representation
627
+ * @param options
628
+ * @returns str
629
+ * @override
630
+ */
631
+ _toHTML(options?: StringOptions): string;
632
+ /**
633
+ * Get LaTeX representation
634
+ * @param options
635
+ * @returns str
636
+ */
637
+ _toTex(options?: StringOptions): string;
581
638
  traverse(callback: (node: {
582
639
  get type(): string;
583
640
  get isNode(): boolean;
@@ -645,68 +702,6 @@ export declare const createBlockNode: import("../utils/factory.js").FactoryFunct
645
702
  getIdentifier(): string;
646
703
  getContent(): any;
647
704
  } | null) => void): void;
648
- blocks: BlockItem[];
649
- get type(): string;
650
- get isBlockNode(): boolean;
651
- /**
652
- * Compile a node into a JavaScript function.
653
- * This basically pre-calculates as much as possible and only leaves open
654
- * calculations which depend on a dynamic scope with variables.
655
- * @param {Object} math Math.js namespace with functions and constants.
656
- * @param {Object} argNames An object with argument names as key and `true`
657
- * as value. Used in the SymbolNode to optimize
658
- * for arguments from user assigned functions
659
- * (see FunctionAssignmentNode) or special symbols
660
- * like `end` (see IndexNode).
661
- * @return {function} Returns a function which can be called like:
662
- * evalNode(scope: Object, args: Object, context: *)
663
- */
664
- _compile(math: Record<string, unknown>, argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
665
- /**
666
- * Execute a callback for each of the child blocks of this node
667
- * @param {function(child: Node, path: string, parent: Node)} callback
668
- */
669
- forEach(callback: (child: MathNode, path: string, parent: MathNode) => void): void;
670
- /**
671
- * Create a new BlockNode whose children are the results of calling
672
- * the provided callback function for each child of the original node.
673
- * @param {function(child: Node, path: string, parent: Node): Node} callback
674
- * @returns {BlockNode} Returns a transformed copy of the node
675
- */
676
- map(callback: (child: MathNode, path: string, parent: MathNode) => MathNode): /*elided*/ any;
677
- /**
678
- * Create a clone of this node, a shallow copy
679
- * @return {BlockNode}
680
- */
681
- clone(): /*elided*/ any;
682
- /**
683
- * Get string representation
684
- * @param {Object} options
685
- * @return {string} str
686
- * @override
687
- */
688
- _toString(options?: StringOptions): string;
689
- /**
690
- * Get a JSON representation of the node
691
- * @returns {Object}
692
- */
693
- toJSON(): {
694
- mathjs: string;
695
- blocks: BlockItem[];
696
- };
697
- /**
698
- * Get HTML representation
699
- * @param {Object} options
700
- * @return {string} str
701
- * @override
702
- */
703
- _toHTML(options?: StringOptions): string;
704
- /**
705
- * Get LaTeX representation
706
- * @param {Object} options
707
- * @return {string} str
708
- */
709
- _toTex(options?: StringOptions): string;
710
705
  transform(callback: (node: {
711
706
  get type(): string;
712
707
  get isNode(): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"BlockNode.d.ts","sourceRoot":"","sources":["../../src/node/BlockNode.ts"],"names":[],"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY5C,CAAC"}
@@ -418,42 +418,40 @@ export declare const createConditionalNode: import("../utils/factory.js").Factor
418
418
  * Compile a node into a JavaScript function.
419
419
  * This basically pre-calculates as much as possible and only leaves open
420
420
  * calculations which depend on a dynamic scope with variables.
421
- * @param {Object} math Math.js namespace with functions and constants.
422
- * @param {Object} argNames An object with argument names as key and `true`
421
+ * @param math - Math.js namespace with functions and constants.
422
+ * @param argNames - An object with argument names as key and `true`
423
423
  * as value. Used in the SymbolNode to optimize
424
424
  * for arguments from user assigned functions
425
425
  * (see FunctionAssignmentNode) or special symbols
426
426
  * like `end` (see IndexNode).
427
- * @return {function} Returns a function which can be called like:
427
+ * @returns Returns a function which can be called like:
428
428
  * evalNode(scope: Object, args: Object, context: *)
429
429
  */
430
430
  _compile(math: Record<string, unknown>, argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
431
431
  /**
432
432
  * Execute a callback for each of the child nodes of this node
433
- * @param {function(child: Node, path: string, parent: Node)} callback
433
+ * @param callback
434
434
  */
435
435
  forEach(callback: (child: MathNode, path: string, parent: MathNode) => void): void;
436
436
  /**
437
437
  * Create a new ConditionalNode whose children are the results of calling
438
438
  * the provided callback function for each child of the original node.
439
- * @param {function(child: Node, path: string, parent: Node): Node} callback
440
- * @returns {ConditionalNode} Returns a transformed copy of the node
439
+ * @param callback
440
+ * @returns Returns a transformed copy of the node
441
441
  */
442
442
  map(callback: (child: MathNode, path: string, parent: MathNode) => MathNode): /*elided*/ any;
443
443
  /**
444
444
  * Create a clone of this node, a shallow copy
445
- * @return {ConditionalNode}
446
445
  */
447
446
  clone(): /*elided*/ any;
448
447
  /**
449
448
  * Get string representation
450
- * @param {Object} options
451
- * @return {string} str
449
+ * @param options
450
+ * @returns str
452
451
  */
453
452
  _toString(options?: StringOptions): string;
454
453
  /**
455
454
  * Get a JSON representation of the node
456
- * @returns {Object}
457
455
  */
458
456
  toJSON(): {
459
457
  mathjs: string;
@@ -463,14 +461,14 @@ export declare const createConditionalNode: import("../utils/factory.js").Factor
463
461
  };
464
462
  /**
465
463
  * Get HTML representation
466
- * @param {Object} options
467
- * @return {string} str
464
+ * @param options
465
+ * @returns str
468
466
  */
469
467
  _toHTML(options?: StringOptions): string;
470
468
  /**
471
469
  * Get LaTeX representation
472
- * @param {Object} options
473
- * @return {string} str
470
+ * @param options
471
+ * @returns str
474
472
  */
475
473
  _toTex(options?: StringOptions): string;
476
474
  toHTML(options?: StringOptions): string;
@@ -523,7 +521,7 @@ export declare const createConditionalNode: import("../utils/factory.js").Factor
523
521
  name: string;
524
522
  /**
525
523
  * Instantiate an ConditionalNode from its JSON representation
526
- * @param {Object} json
524
+ * @param json
527
525
  * An object structured like
528
526
  * ```
529
527
  * {"mathjs": "ConditionalNode",
@@ -532,7 +530,6 @@ export declare const createConditionalNode: import("../utils/factory.js").Factor
532
530
  * "falseExpr": ...}
533
531
  * ```
534
532
  * where mathjs is optional
535
- * @returns {ConditionalNode}
536
533
  */
537
534
  fromJSON(json: {
538
535
  condition: MathNode;
@@ -954,42 +951,40 @@ export declare const createConditionalNode: import("../utils/factory.js").Factor
954
951
  * Compile a node into a JavaScript function.
955
952
  * This basically pre-calculates as much as possible and only leaves open
956
953
  * calculations which depend on a dynamic scope with variables.
957
- * @param {Object} math Math.js namespace with functions and constants.
958
- * @param {Object} argNames An object with argument names as key and `true`
954
+ * @param math - Math.js namespace with functions and constants.
955
+ * @param argNames - An object with argument names as key and `true`
959
956
  * as value. Used in the SymbolNode to optimize
960
957
  * for arguments from user assigned functions
961
958
  * (see FunctionAssignmentNode) or special symbols
962
959
  * like `end` (see IndexNode).
963
- * @return {function} Returns a function which can be called like:
960
+ * @returns Returns a function which can be called like:
964
961
  * evalNode(scope: Object, args: Object, context: *)
965
962
  */
966
963
  _compile(math: Record<string, unknown>, argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
967
964
  /**
968
965
  * Execute a callback for each of the child nodes of this node
969
- * @param {function(child: Node, path: string, parent: Node)} callback
966
+ * @param callback
970
967
  */
971
968
  forEach(callback: (child: MathNode, path: string, parent: MathNode) => void): void;
972
969
  /**
973
970
  * Create a new ConditionalNode whose children are the results of calling
974
971
  * the provided callback function for each child of the original node.
975
- * @param {function(child: Node, path: string, parent: Node): Node} callback
976
- * @returns {ConditionalNode} Returns a transformed copy of the node
972
+ * @param callback
973
+ * @returns Returns a transformed copy of the node
977
974
  */
978
975
  map(callback: (child: MathNode, path: string, parent: MathNode) => MathNode): /*elided*/ any;
979
976
  /**
980
977
  * Create a clone of this node, a shallow copy
981
- * @return {ConditionalNode}
982
978
  */
983
979
  clone(): /*elided*/ any;
984
980
  /**
985
981
  * Get string representation
986
- * @param {Object} options
987
- * @return {string} str
982
+ * @param options
983
+ * @returns str
988
984
  */
989
985
  _toString(options?: StringOptions): string;
990
986
  /**
991
987
  * Get a JSON representation of the node
992
- * @returns {Object}
993
988
  */
994
989
  toJSON(): {
995
990
  mathjs: string;
@@ -999,14 +994,14 @@ export declare const createConditionalNode: import("../utils/factory.js").Factor
999
994
  };
1000
995
  /**
1001
996
  * Get HTML representation
1002
- * @param {Object} options
1003
- * @return {string} str
997
+ * @param options
998
+ * @returns str
1004
999
  */
1005
1000
  _toHTML(options?: StringOptions): string;
1006
1001
  /**
1007
1002
  * Get LaTeX representation
1008
- * @param {Object} options
1009
- * @return {string} str
1003
+ * @param options
1004
+ * @returns str
1010
1005
  */
1011
1006
  _toTex(options?: StringOptions): string;
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