@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.
- package/README.md +42 -42
- package/dist/index.js +276 -347
- package/dist/node/AccessorNode.d.ts +121 -132
- package/dist/node/AccessorNode.d.ts.map +1 -1
- package/dist/node/ArrayNode.d.ts +25 -30
- package/dist/node/ArrayNode.d.ts.map +1 -1
- package/dist/node/AssignmentNode.d.ts +19 -32
- package/dist/node/AssignmentNode.d.ts.map +1 -1
- package/dist/node/BlockNode.d.ts +121 -126
- package/dist/node/BlockNode.d.ts.map +1 -1
- package/dist/node/ConditionalNode.d.ts +25 -30
- package/dist/node/ConditionalNode.d.ts.map +1 -1
- package/dist/node/ConstantNode.d.ts +93 -100
- package/dist/node/ConstantNode.d.ts.map +1 -1
- package/dist/node/FunctionAssignmentNode.d.ts +93 -98
- package/dist/node/FunctionAssignmentNode.d.ts.map +1 -1
- package/dist/node/FunctionNode.d.ts +32 -43
- package/dist/node/FunctionNode.d.ts.map +1 -1
- package/dist/node/IndexNode.d.ts +949 -72
- package/dist/node/IndexNode.d.ts.map +1 -1
- package/dist/node/Node.d.ts +43 -39
- package/dist/node/Node.d.ts.map +1 -1
- package/dist/node/ObjectNode.d.ts +947 -56
- package/dist/node/ObjectNode.d.ts.map +1 -1
- package/dist/node/OperatorNode.d.ts +955 -79
- package/dist/node/OperatorNode.d.ts.map +1 -1
- package/dist/node/ParenthesisNode.d.ts +881 -63
- package/dist/node/ParenthesisNode.d.ts.map +1 -1
- package/dist/node/RangeNode.d.ts +955 -71
- package/dist/node/RangeNode.d.ts.map +1 -1
- package/dist/node/RelationalNode.d.ts +947 -61
- package/dist/node/RelationalNode.d.ts.map +1 -1
- package/dist/node/SymbolNode.d.ts +942 -43
- package/dist/node/SymbolNode.d.ts.map +1 -1
- package/dist/node/utils/access.d.ts +8 -1
- package/dist/node/utils/access.d.ts.map +1 -1
- package/dist/node/utils/assign.d.ts +9 -1
- package/dist/node/utils/assign.d.ts.map +1 -1
- package/dist/node/utils/stringSubset.d.ts +8 -8
- package/dist/operators.d.ts +12 -15
- package/dist/operators.d.ts.map +1 -1
- package/dist/parse.d.ts +2 -0
- package/dist/parse.d.ts.map +1 -1
- package/dist/transform/utils/dimToZeroBase.d.ts +4 -0
- package/dist/transform/utils/dimToZeroBase.d.ts.map +1 -1
- package/dist/types.d.ts +8 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/is.d.ts +275 -3
- package/dist/utils/is.d.ts.map +1 -1
- package/dist/utils/latex.d.ts +12 -0
- package/dist/utils/latex.d.ts.map +1 -1
- package/package.json +59 -59
package/dist/utils/is.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The minimum shape of a BigNumber that `isBigNumber` tests.
|
|
3
|
+
*/
|
|
1
4
|
export interface BigNumber {
|
|
2
5
|
isBigNumber: boolean;
|
|
3
6
|
constructor: {
|
|
@@ -7,14 +10,23 @@ export interface BigNumber {
|
|
|
7
10
|
isDecimal?: (x: unknown) => boolean;
|
|
8
11
|
};
|
|
9
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* The minimum shape of a Complex number: the real part `re` and the imaginary part `im`.
|
|
15
|
+
*/
|
|
10
16
|
export interface Complex {
|
|
11
17
|
re: number;
|
|
12
18
|
im: number;
|
|
13
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* The minimum shape of a Fraction: the numerator `n` and the denominator `d`.
|
|
22
|
+
*/
|
|
14
23
|
export interface Fraction {
|
|
15
24
|
n: number;
|
|
16
25
|
d: number;
|
|
17
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* The minimum shape of a Unit that `isUnit` tests. The constructor prototype carries the `isUnit` flag.
|
|
29
|
+
*/
|
|
18
30
|
export interface Unit {
|
|
19
31
|
constructor: {
|
|
20
32
|
prototype: {
|
|
@@ -22,6 +34,9 @@ export interface Unit {
|
|
|
22
34
|
};
|
|
23
35
|
};
|
|
24
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* The minimum shape of a Matrix that `isMatrix` tests. The constructor prototype carries the `isMatrix` flag.
|
|
39
|
+
*/
|
|
25
40
|
export interface Matrix {
|
|
26
41
|
isMatrix?: boolean;
|
|
27
42
|
_size?: number[];
|
|
@@ -31,12 +46,21 @@ export interface Matrix {
|
|
|
31
46
|
};
|
|
32
47
|
};
|
|
33
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* The minimum shape of a DenseMatrix: a Matrix with the `isDenseMatrix` flag.
|
|
51
|
+
*/
|
|
34
52
|
export interface DenseMatrix extends Matrix {
|
|
35
53
|
isDenseMatrix: boolean;
|
|
36
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* The minimum shape of a SparseMatrix: a Matrix with the `isSparseMatrix` flag.
|
|
57
|
+
*/
|
|
37
58
|
export interface SparseMatrix extends Matrix {
|
|
38
59
|
isSparseMatrix: boolean;
|
|
39
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* The minimum shape of a Range that `isRange` tests. The constructor prototype carries the `isRange` flag.
|
|
63
|
+
*/
|
|
40
64
|
export interface Range {
|
|
41
65
|
start: number;
|
|
42
66
|
end: number;
|
|
@@ -47,6 +71,9 @@ export interface Range {
|
|
|
47
71
|
};
|
|
48
72
|
};
|
|
49
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* The minimum shape of one dimension of an Index.
|
|
76
|
+
*/
|
|
50
77
|
export interface IndexDimension {
|
|
51
78
|
_data?: unknown[];
|
|
52
79
|
_size: number[];
|
|
@@ -54,6 +81,9 @@ export interface IndexDimension {
|
|
|
54
81
|
start?: number;
|
|
55
82
|
end?: number;
|
|
56
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* The minimum shape of a Index that `isIndex` tests. The constructor prototype carries the `isIndex` flag.
|
|
86
|
+
*/
|
|
57
87
|
export interface Index {
|
|
58
88
|
_dimensions: (IndexDimension | string)[];
|
|
59
89
|
_sourceSize?: (number | null)[];
|
|
@@ -63,6 +93,9 @@ export interface Index {
|
|
|
63
93
|
};
|
|
64
94
|
};
|
|
65
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* The minimum shape of a ResultSet that `isResultSet` tests. The constructor prototype carries the `isResultSet` flag.
|
|
98
|
+
*/
|
|
66
99
|
export interface ResultSet<T = unknown> {
|
|
67
100
|
entries: T[];
|
|
68
101
|
constructor: {
|
|
@@ -71,6 +104,9 @@ export interface ResultSet<T = unknown> {
|
|
|
71
104
|
};
|
|
72
105
|
};
|
|
73
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* The minimum shape of a Help that `isHelp` tests. The constructor prototype carries the `isHelp` flag.
|
|
109
|
+
*/
|
|
74
110
|
export interface Help {
|
|
75
111
|
constructor: {
|
|
76
112
|
prototype: {
|
|
@@ -78,6 +114,9 @@ export interface Help {
|
|
|
78
114
|
};
|
|
79
115
|
};
|
|
80
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* The minimum shape of a Chain that `isChain` tests. The constructor prototype carries the `isChain` flag.
|
|
119
|
+
*/
|
|
81
120
|
export interface Chain {
|
|
82
121
|
constructor: {
|
|
83
122
|
prototype: {
|
|
@@ -85,6 +124,9 @@ export interface Chain {
|
|
|
85
124
|
};
|
|
86
125
|
};
|
|
87
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* The minimum shape of an expression node. The constructor prototype carries the `isNode` flag.
|
|
129
|
+
*/
|
|
88
130
|
export interface Node {
|
|
89
131
|
isNode: boolean;
|
|
90
132
|
constructor: {
|
|
@@ -93,112 +135,342 @@ export interface Node {
|
|
|
93
135
|
};
|
|
94
136
|
};
|
|
95
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* The minimum shape of a AccessorNode: a Node with the `isAccessorNode` flag.
|
|
140
|
+
*/
|
|
96
141
|
export interface AccessorNode extends Node {
|
|
97
142
|
isAccessorNode: boolean;
|
|
98
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* The minimum shape of a ArrayNode: a Node with the `isArrayNode` flag.
|
|
146
|
+
*/
|
|
99
147
|
export interface ArrayNode extends Node {
|
|
100
148
|
isArrayNode: boolean;
|
|
101
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* The minimum shape of a AssignmentNode: a Node with the `isAssignmentNode` flag.
|
|
152
|
+
*/
|
|
102
153
|
export interface AssignmentNode extends Node {
|
|
103
154
|
isAssignmentNode: boolean;
|
|
104
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* The minimum shape of a BlockNode: a Node with the `isBlockNode` flag.
|
|
158
|
+
*/
|
|
105
159
|
export interface BlockNode extends Node {
|
|
106
160
|
isBlockNode: boolean;
|
|
107
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* The minimum shape of a ConditionalNode: a Node with the `isConditionalNode` flag.
|
|
164
|
+
*/
|
|
108
165
|
export interface ConditionalNode extends Node {
|
|
109
166
|
isConditionalNode: boolean;
|
|
110
167
|
}
|
|
168
|
+
/**
|
|
169
|
+
* The minimum shape of a ConstantNode: a Node with the `isConstantNode` flag.
|
|
170
|
+
*/
|
|
111
171
|
export interface ConstantNode extends Node {
|
|
112
172
|
isConstantNode: boolean;
|
|
173
|
+
value: unknown;
|
|
113
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* The minimum shape of a FunctionAssignmentNode: a Node with the `isFunctionAssignmentNode` flag.
|
|
177
|
+
*/
|
|
114
178
|
export interface FunctionAssignmentNode extends Node {
|
|
115
179
|
isFunctionAssignmentNode: boolean;
|
|
116
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* The minimum shape of a FunctionNode: a Node with the `isFunctionNode` flag.
|
|
183
|
+
*/
|
|
117
184
|
export interface FunctionNode extends Node {
|
|
118
185
|
isFunctionNode: boolean;
|
|
119
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* The minimum shape of a IndexNode: a Node with the `isIndexNode` flag.
|
|
189
|
+
*/
|
|
120
190
|
export interface IndexNode extends Node {
|
|
121
191
|
isIndexNode: boolean;
|
|
122
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* The minimum shape of a ObjectNode: a Node with the `isObjectNode` flag.
|
|
195
|
+
*/
|
|
123
196
|
export interface ObjectNode extends Node {
|
|
124
197
|
isObjectNode: boolean;
|
|
125
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* The minimum shape of an OperatorNode: a Node with the `isOperatorNode` flag, the operator `op` and the arguments `args`.
|
|
201
|
+
*/
|
|
126
202
|
export interface OperatorNode extends Node {
|
|
127
203
|
isOperatorNode: boolean;
|
|
128
204
|
op: string;
|
|
129
205
|
args: Node[];
|
|
130
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* The minimum shape of a ParenthesisNode: a Node with the `isParenthesisNode` flag.
|
|
209
|
+
*/
|
|
131
210
|
export interface ParenthesisNode extends Node {
|
|
132
211
|
isParenthesisNode: boolean;
|
|
133
212
|
}
|
|
213
|
+
/**
|
|
214
|
+
* The minimum shape of a RangeNode: a Node with the `isRangeNode` flag.
|
|
215
|
+
*/
|
|
134
216
|
export interface RangeNode extends Node {
|
|
135
217
|
isRangeNode: boolean;
|
|
136
218
|
}
|
|
219
|
+
/**
|
|
220
|
+
* The minimum shape of a RelationalNode: a Node with the `isRelationalNode` flag.
|
|
221
|
+
*/
|
|
137
222
|
export interface RelationalNode extends Node {
|
|
138
223
|
isRelationalNode: boolean;
|
|
139
224
|
}
|
|
225
|
+
/**
|
|
226
|
+
* The minimum shape of a SymbolNode: a Node with the `isSymbolNode` flag.
|
|
227
|
+
*/
|
|
140
228
|
export interface SymbolNode extends Node {
|
|
141
229
|
isSymbolNode: boolean;
|
|
230
|
+
name: string;
|
|
142
231
|
}
|
|
232
|
+
/**
|
|
233
|
+
* The minimum shape of a PartitionedMap: two maps, `a` and `b`.
|
|
234
|
+
*/
|
|
143
235
|
export interface PartitionedMap<K = unknown, V = unknown> {
|
|
144
236
|
a: Map<K, V>;
|
|
145
237
|
b: Map<K, V>;
|
|
146
238
|
}
|
|
239
|
+
/**
|
|
240
|
+
* Return `true` if `typeof x` is `'number'`.
|
|
241
|
+
* @param x - The value to test.
|
|
242
|
+
*/
|
|
147
243
|
export declare function isNumber(x: unknown): x is number;
|
|
244
|
+
/**
|
|
245
|
+
* Return `true` if the value is a BigNumber.
|
|
246
|
+
* The test accepts an object with `isBigNumber === true` whose constructor prototype also has `isBigNumber === true`.
|
|
247
|
+
* It also accepts an object for which `constructor.isDecimal` returns `true`.
|
|
248
|
+
* @param x - The value to test.
|
|
249
|
+
*/
|
|
148
250
|
export declare function isBigNumber(x: unknown): x is BigNumber;
|
|
251
|
+
/**
|
|
252
|
+
* Return `true` if `typeof x` is `'bigint'`.
|
|
253
|
+
* @param x - The value to test.
|
|
254
|
+
*/
|
|
149
255
|
export declare function isBigInt(x: unknown): x is bigint;
|
|
256
|
+
/**
|
|
257
|
+
* Return `true` if the value is an object whose prototype has `isComplex === true`.
|
|
258
|
+
* @param x - The value to test.
|
|
259
|
+
*/
|
|
150
260
|
export declare function isComplex(x: unknown): x is Complex;
|
|
261
|
+
/**
|
|
262
|
+
* Return `true` if the value is an object whose prototype has `isFraction === true`.
|
|
263
|
+
* @param x - The value to test.
|
|
264
|
+
*/
|
|
151
265
|
export declare function isFraction(x: unknown): x is Fraction;
|
|
266
|
+
/**
|
|
267
|
+
* Return `true` if the value is an object whose constructor prototype has `isUnit === true`.
|
|
268
|
+
* The test uses duck typing, not `instanceof`.
|
|
269
|
+
* @param x - The value to test.
|
|
270
|
+
*/
|
|
152
271
|
export declare function isUnit(x: unknown): x is Unit;
|
|
272
|
+
/**
|
|
273
|
+
* Return `true` if `typeof x` is `'string'`.
|
|
274
|
+
* @param x - The value to test.
|
|
275
|
+
*/
|
|
153
276
|
export declare function isString(x: unknown): x is string;
|
|
154
277
|
export declare const isArray: (arg: any) => arg is any[];
|
|
278
|
+
/**
|
|
279
|
+
* Return `true` if the value is an object whose constructor prototype has `isMatrix === true`.
|
|
280
|
+
* The test uses duck typing, not `instanceof`.
|
|
281
|
+
* @param x - The value to test.
|
|
282
|
+
*/
|
|
155
283
|
export declare function isMatrix(x: unknown): x is Matrix;
|
|
156
284
|
/**
|
|
157
285
|
* Test whether a value is a collection: an Array or Matrix
|
|
158
|
-
* @param
|
|
159
|
-
* @returns
|
|
286
|
+
* @param x
|
|
287
|
+
* @returns isCollection
|
|
160
288
|
*/
|
|
161
289
|
export declare function isCollection(x: unknown): x is unknown[] | Matrix;
|
|
290
|
+
/**
|
|
291
|
+
* Return `true` if the value has `isDenseMatrix === true` and its constructor prototype has `isMatrix === true`.
|
|
292
|
+
* @param x - The value to test.
|
|
293
|
+
*/
|
|
162
294
|
export declare function isDenseMatrix(x: unknown): x is DenseMatrix;
|
|
295
|
+
/**
|
|
296
|
+
* Return `true` if the value has `isSparseMatrix === true` and its constructor prototype has `isMatrix === true`.
|
|
297
|
+
* @param x - The value to test.
|
|
298
|
+
*/
|
|
163
299
|
export declare function isSparseMatrix(x: unknown): x is SparseMatrix;
|
|
300
|
+
/**
|
|
301
|
+
* Return `true` if the value is an object whose constructor prototype has `isRange === true`.
|
|
302
|
+
* The test uses duck typing, not `instanceof`.
|
|
303
|
+
* @param x - The value to test.
|
|
304
|
+
*/
|
|
164
305
|
export declare function isRange(x: unknown): x is Range;
|
|
306
|
+
/**
|
|
307
|
+
* Return `true` if the value is an object whose constructor prototype has `isIndex === true`.
|
|
308
|
+
* The test uses duck typing, not `instanceof`.
|
|
309
|
+
* @param x - The value to test.
|
|
310
|
+
*/
|
|
165
311
|
export declare function isIndex(x: unknown): x is Index;
|
|
312
|
+
/**
|
|
313
|
+
* Return `true` if `typeof x` is `'boolean'`.
|
|
314
|
+
* @param x - The value to test.
|
|
315
|
+
*/
|
|
166
316
|
export declare function isBoolean(x: unknown): x is boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Return `true` if the value is an object whose constructor prototype has `isResultSet === true`.
|
|
319
|
+
* The test uses duck typing, not `instanceof`.
|
|
320
|
+
* @param x - The value to test.
|
|
321
|
+
*/
|
|
167
322
|
export declare function isResultSet(x: unknown): x is ResultSet;
|
|
323
|
+
/**
|
|
324
|
+
* Return `true` if the value is an object whose constructor prototype has `isHelp === true`.
|
|
325
|
+
* The test uses duck typing, not `instanceof`.
|
|
326
|
+
* @param x - The value to test.
|
|
327
|
+
*/
|
|
168
328
|
export declare function isHelp(x: unknown): x is Help;
|
|
329
|
+
/**
|
|
330
|
+
* Return `true` if `typeof x` is `'function'`.
|
|
331
|
+
* @param x - The value to test.
|
|
332
|
+
*/
|
|
169
333
|
export declare function isFunction(x: unknown): x is (...args: unknown[]) => unknown;
|
|
334
|
+
/**
|
|
335
|
+
* Return `true` if the value is an instance of `Date`.
|
|
336
|
+
* @param x - The value to test.
|
|
337
|
+
*/
|
|
170
338
|
export declare function isDate(x: unknown): x is Date;
|
|
339
|
+
/**
|
|
340
|
+
* Return `true` if the value is an instance of `RegExp`.
|
|
341
|
+
* @param x - The value to test.
|
|
342
|
+
*/
|
|
171
343
|
export declare function isRegExp(x: unknown): x is RegExp;
|
|
344
|
+
/**
|
|
345
|
+
* Return `true` if the value is a plain object.
|
|
346
|
+
* The constructor must be `Object`, and the value must not be a Complex or a Fraction.
|
|
347
|
+
* @param x - The value to test.
|
|
348
|
+
*/
|
|
172
349
|
export declare function isObject(x: unknown): x is Record<string, unknown>;
|
|
173
350
|
/**
|
|
174
351
|
* Returns `true` if the passed object appears to be a Map (i.e. duck typing).
|
|
175
352
|
*
|
|
176
353
|
* Methods looked for are `get`, `set`, `keys` and `has`.
|
|
177
354
|
*
|
|
178
|
-
* @param
|
|
355
|
+
* @param object
|
|
179
356
|
* @returns
|
|
180
357
|
*/
|
|
181
358
|
export declare function isMap(object: unknown): object is Map<unknown, unknown>;
|
|
359
|
+
/**
|
|
360
|
+
* Return `true` if the value is Map-like and its `a` and `b` properties are Map-like.
|
|
361
|
+
* The `isMap` function defines Map-like.
|
|
362
|
+
* @param object - The value to test.
|
|
363
|
+
*/
|
|
182
364
|
export declare function isPartitionedMap(object: unknown): object is PartitionedMap;
|
|
365
|
+
/**
|
|
366
|
+
* Return `true` if the value is `null`.
|
|
367
|
+
* @param x - The value to test.
|
|
368
|
+
*/
|
|
183
369
|
export declare function isNull(x: unknown): x is null;
|
|
370
|
+
/**
|
|
371
|
+
* Return `true` if the value is `undefined`.
|
|
372
|
+
* @param x - The value to test.
|
|
373
|
+
*/
|
|
184
374
|
export declare function isUndefined(x: unknown): x is undefined;
|
|
375
|
+
/**
|
|
376
|
+
* Return `true` if the value has `isAccessorNode === true` and its constructor prototype has `isNode === true`.
|
|
377
|
+
* @param x - The value to test.
|
|
378
|
+
*/
|
|
185
379
|
export declare function isAccessorNode(x: unknown): x is AccessorNode;
|
|
380
|
+
/**
|
|
381
|
+
* Return `true` if the value has `isArrayNode === true` and its constructor prototype has `isNode === true`.
|
|
382
|
+
* @param x - The value to test.
|
|
383
|
+
*/
|
|
186
384
|
export declare function isArrayNode(x: unknown): x is ArrayNode;
|
|
385
|
+
/**
|
|
386
|
+
* Return `true` if the value has `isAssignmentNode === true` and its constructor prototype has `isNode === true`.
|
|
387
|
+
* @param x - The value to test.
|
|
388
|
+
*/
|
|
187
389
|
export declare function isAssignmentNode(x: unknown): x is AssignmentNode;
|
|
390
|
+
/**
|
|
391
|
+
* Return `true` if the value has `isBlockNode === true` and its constructor prototype has `isNode === true`.
|
|
392
|
+
* @param x - The value to test.
|
|
393
|
+
*/
|
|
188
394
|
export declare function isBlockNode(x: unknown): x is BlockNode;
|
|
395
|
+
/**
|
|
396
|
+
* Return `true` if the value has `isConditionalNode === true` and its constructor prototype has `isNode === true`.
|
|
397
|
+
* @param x - The value to test.
|
|
398
|
+
*/
|
|
189
399
|
export declare function isConditionalNode(x: unknown): x is ConditionalNode;
|
|
400
|
+
/**
|
|
401
|
+
* Return `true` if the value has `isConstantNode === true` and its constructor prototype has `isNode === true`.
|
|
402
|
+
* @param x - The value to test.
|
|
403
|
+
*/
|
|
190
404
|
export declare function isConstantNode(x: unknown): x is ConstantNode;
|
|
405
|
+
/**
|
|
406
|
+
* Return `true` if the node is a ConstantNode, or a one-argument OperatorNode with a ConstantNode argument.
|
|
407
|
+
* For the OperatorNode, the string `'-+~'` must contain the operator.
|
|
408
|
+
* The parser and the precedence helpers in `operators.ts` use this test to give the division in a numerator like `-2/3 x` precedence over implicit multiplication.
|
|
409
|
+
* @param node - The node to test.
|
|
410
|
+
*/
|
|
191
411
|
export declare function rule2Node(node: unknown): boolean;
|
|
412
|
+
/**
|
|
413
|
+
* Return `true` if the value has `isFunctionAssignmentNode === true` and its constructor prototype has `isNode === true`.
|
|
414
|
+
* @param x - The value to test.
|
|
415
|
+
*/
|
|
192
416
|
export declare function isFunctionAssignmentNode(x: unknown): x is FunctionAssignmentNode;
|
|
417
|
+
/**
|
|
418
|
+
* Return `true` if the value has `isFunctionNode === true` and its constructor prototype has `isNode === true`.
|
|
419
|
+
* @param x - The value to test.
|
|
420
|
+
*/
|
|
193
421
|
export declare function isFunctionNode(x: unknown): x is FunctionNode;
|
|
422
|
+
/**
|
|
423
|
+
* Return `true` if the value has `isIndexNode === true` and its constructor prototype has `isNode === true`.
|
|
424
|
+
* @param x - The value to test.
|
|
425
|
+
*/
|
|
194
426
|
export declare function isIndexNode(x: unknown): x is IndexNode;
|
|
427
|
+
/**
|
|
428
|
+
* Return `true` if the value has `isNode === true` and its constructor prototype has `isNode === true`.
|
|
429
|
+
* @param x - The value to test.
|
|
430
|
+
*/
|
|
195
431
|
export declare function isNode(x: unknown): x is Node;
|
|
432
|
+
/**
|
|
433
|
+
* Return `true` if the value has `isObjectNode === true` and its constructor prototype has `isNode === true`.
|
|
434
|
+
* @param x - The value to test.
|
|
435
|
+
*/
|
|
196
436
|
export declare function isObjectNode(x: unknown): x is ObjectNode;
|
|
437
|
+
/**
|
|
438
|
+
* Return `true` if the value has `isOperatorNode === true` and its constructor prototype has `isNode === true`.
|
|
439
|
+
* @param x - The value to test.
|
|
440
|
+
*/
|
|
197
441
|
export declare function isOperatorNode(x: unknown): x is OperatorNode;
|
|
442
|
+
/**
|
|
443
|
+
* Return `true` if the value has `isParenthesisNode === true` and its constructor prototype has `isNode === true`.
|
|
444
|
+
* @param x - The value to test.
|
|
445
|
+
*/
|
|
198
446
|
export declare function isParenthesisNode(x: unknown): x is ParenthesisNode;
|
|
447
|
+
/**
|
|
448
|
+
* Return `true` if the value has `isRangeNode === true` and its constructor prototype has `isNode === true`.
|
|
449
|
+
* @param x - The value to test.
|
|
450
|
+
*/
|
|
199
451
|
export declare function isRangeNode(x: unknown): x is RangeNode;
|
|
452
|
+
/**
|
|
453
|
+
* Return `true` if the value has `isRelationalNode === true` and its constructor prototype has `isNode === true`.
|
|
454
|
+
* @param x - The value to test.
|
|
455
|
+
*/
|
|
200
456
|
export declare function isRelationalNode(x: unknown): x is RelationalNode;
|
|
457
|
+
/**
|
|
458
|
+
* Return `true` if the value has `isSymbolNode === true` and its constructor prototype has `isNode === true`.
|
|
459
|
+
* @param x - The value to test.
|
|
460
|
+
*/
|
|
201
461
|
export declare function isSymbolNode(x: unknown): x is SymbolNode;
|
|
462
|
+
/**
|
|
463
|
+
* Return `true` if the value is an object whose constructor prototype has `isChain === true`.
|
|
464
|
+
* The test uses duck typing, not `instanceof`.
|
|
465
|
+
* @param x - The value to test.
|
|
466
|
+
*/
|
|
202
467
|
export declare function isChain(x: unknown): x is Chain;
|
|
468
|
+
/**
|
|
469
|
+
* Return the type name of a value.
|
|
470
|
+
* For `null`, the result is `'null'`. For a BigNumber, the result is `'BigNumber'`.
|
|
471
|
+
* For another object, the result is the constructor name, or `'Object'` if there is no name.
|
|
472
|
+
* For other values, the result is `typeof x`.
|
|
473
|
+
* @param x - The value to test.
|
|
474
|
+
*/
|
|
203
475
|
export declare function typeOf(x: unknown): string;
|
|
204
476
|
//# sourceMappingURL=is.d.ts.map
|
package/dist/utils/is.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is.d.ts","sourceRoot":"","sources":["../../src/utils/is.ts"],"names":[],"mappings":"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,CAAC,IAAI,YAAY,CAO5D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,eAAe,CAOlE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,SAAS,CAOtD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,cAAc,CAOhE;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,UAAU,CAOxD;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,KAAK,CAI9C;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAazC"}
|
package/dist/utils/latex.d.ts
CHANGED
|
@@ -435,6 +435,18 @@ export declare const latexFunctions: {
|
|
|
435
435
|
};
|
|
436
436
|
};
|
|
437
437
|
export declare const defaultTemplate = "\\mathrm{${name}}\\left(${args}\\right)";
|
|
438
|
+
/**
|
|
439
|
+
* Escape the LaTeX special characters in a string.
|
|
440
|
+
* This function calls the `escape-latex` package with `preserveFormatting: true`.
|
|
441
|
+
* @param string - The text to escape.
|
|
442
|
+
*/
|
|
438
443
|
export declare function escapeLatex(string: string): any;
|
|
444
|
+
/**
|
|
445
|
+
* Convert a name to its LaTeX form.
|
|
446
|
+
* If `isUnit` is truthy, a known unit (only `deg`) gets its symbol, and other names get `\mathrm{...}`.
|
|
447
|
+
* If not, a known symbol name gets its LaTeX symbol, and other names are escaped.
|
|
448
|
+
* @param name - The symbol or unit name.
|
|
449
|
+
* @param isUnit - Optional. Set to a truthy value for a unit name. Default is `false`.
|
|
450
|
+
*/
|
|
439
451
|
export declare function toSymbol(name: string, isUnit?: unknown): any;
|
|
440
452
|
//# sourceMappingURL=latex.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"latex.d.ts","sourceRoot":"","sources":["../../src/utils/latex.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,eAAO,MAAM,YAAY;IAEvB,KAAK;IACL,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,OAAO;IACP,OAAO;IACP,UAAU;IACV,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,GAAG;IACH,KAAK;IACL,KAAK;IACL,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,KAAK;IACL,QAAQ;IACR,MAAM;IACN,MAAM;IACN,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,OAAO;IACP,OAAO;IACP,EAAE;IACF,EAAE;IACF,KAAK;IACL,GAAG;IACH,GAAG;IACH,MAAM;IACN,KAAK;IACL,KAAK;IACL,QAAQ;IACR,GAAG;IACH,GAAG;IACH,OAAO;IACP,OAAO;IACP,GAAG;IACH,GAAG;IACH,MAAM;IACN,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,KAAK;IACL,KAAK;IAEL,IAAI;IACJ,KAAK;IAEL,CAAC;IACD,GAAG;IACH,GAAG;IACH,QAAQ;IACR,QAAQ;IACR,EAAE;IACF,GAAG;IACH,SAAS;CACV,CAAC;AAEF,eAAO,MAAM,cAAc;IACzB,SAAS;IACT,UAAU;IACV,SAAS;IACT,GAAG;IACH,MAAM;IACN,SAAS;IACT,UAAU;IACV,MAAM;IACN,GAAG;IACH,QAAQ;IACR,MAAM;IACN,WAAW;IACX,SAAS;IACT,GAAG;IACH,GAAG;IACH,QAAQ;IACR,EAAE;IACF,SAAS;IACT,eAAe;IACf,aAAa;IACb,KAAK;IACL,OAAO;IACP,OAAO;IACP,MAAM;IACN,SAAS;IACT,QAAQ;IACR,MAAM;IAC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zC;AAID;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,OAetD"}
|
package/package.json
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@danielsimonjr/mathts-expression",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "Expression parser and evaluator for MathTS",
|
|
5
|
-
"author": "Daniel Simon Jr.",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"main": "./dist/index.js",
|
|
9
|
-
"module": "./dist/index.js",
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"import": "./dist/index.js",
|
|
14
|
-
"types": "./dist/index.d.ts"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"files": [
|
|
18
|
-
"dist",
|
|
19
|
-
"README.md"
|
|
20
|
-
],
|
|
21
|
-
"scripts": {
|
|
22
|
-
"build": "tsup src/index.ts --format esm --clean && tsc -p tsconfig.dts.json",
|
|
23
|
-
"dev": "tsup src/index.ts --format esm --
|
|
24
|
-
"test": "bun test --isolate --timeout 30000",
|
|
25
|
-
"test:watch": "vitest",
|
|
26
|
-
"test:coverage": "bun test --isolate --timeout 30000 --coverage",
|
|
27
|
-
"typecheck": "tsc --noEmit",
|
|
28
|
-
"lint": "oxlint src",
|
|
29
|
-
"lint:fix": "oxlint src --fix",
|
|
30
|
-
"clean": "rm -rf dist",
|
|
31
|
-
"build:prod": "tsup src/index.ts --format esm --
|
|
32
|
-
},
|
|
33
|
-
"dependencies": {
|
|
34
|
-
"@danielsimonjr/mathts-core": "^0.15.
|
|
35
|
-
"typed-function": "^4.0.0"
|
|
36
|
-
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@types/node": "^26.4.0",
|
|
39
|
-
"tsup": "^8.0.0",
|
|
40
|
-
"typescript": "^7.0.2",
|
|
41
|
-
"vitest": "^5.0.0"
|
|
42
|
-
},
|
|
43
|
-
"publishConfig": {
|
|
44
|
-
"access": "public"
|
|
45
|
-
},
|
|
46
|
-
"repository": {
|
|
47
|
-
"type": "git",
|
|
48
|
-
"url": "git+https://github.com/danielsimonjr/MathTS.git",
|
|
49
|
-
"directory": "expression"
|
|
50
|
-
},
|
|
51
|
-
"keywords": [
|
|
52
|
-
"math",
|
|
53
|
-
"typescript",
|
|
54
|
-
"expression",
|
|
55
|
-
"parser",
|
|
56
|
-
"evaluator",
|
|
57
|
-
"compiler"
|
|
58
|
-
]
|
|
59
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@danielsimonjr/mathts-expression",
|
|
3
|
+
"version": "0.8.2",
|
|
4
|
+
"description": "Expression parser and evaluator for MathTS",
|
|
5
|
+
"author": "Daniel Simon Jr.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"module": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsup src/index.ts --format esm --clean && tsc -p tsconfig.dts.json",
|
|
23
|
+
"dev": "tsup src/index.ts --format esm --watch --onSuccess \"tsc -p tsconfig.dts.json\"",
|
|
24
|
+
"test": "bun test --isolate --timeout 30000",
|
|
25
|
+
"test:watch": "vitest",
|
|
26
|
+
"test:coverage": "bun test --isolate --timeout 30000 --coverage",
|
|
27
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.test.json",
|
|
28
|
+
"lint": "oxlint src",
|
|
29
|
+
"lint:fix": "oxlint src --fix",
|
|
30
|
+
"clean": "rm -rf dist",
|
|
31
|
+
"build:prod": "tsup src/index.ts --format esm --clean --minify --treeshake && tsc -p tsconfig.dts.json"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@danielsimonjr/mathts-core": "^0.15.5",
|
|
35
|
+
"typed-function": "^4.0.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "^26.4.0",
|
|
39
|
+
"tsup": "^8.0.0",
|
|
40
|
+
"typescript": "^7.0.2",
|
|
41
|
+
"vitest": "^5.0.0"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
45
|
+
},
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/danielsimonjr/MathTS.git",
|
|
49
|
+
"directory": "expression"
|
|
50
|
+
},
|
|
51
|
+
"keywords": [
|
|
52
|
+
"math",
|
|
53
|
+
"typescript",
|
|
54
|
+
"expression",
|
|
55
|
+
"parser",
|
|
56
|
+
"evaluator",
|
|
57
|
+
"compiler"
|
|
58
|
+
]
|
|
59
|
+
}
|