feat:node-modules
This commit is contained in:
20
node_modules/mathjs/lib/esm/function/algebra/simplify/wildcards.js
generated
vendored
Normal file
20
node_modules/mathjs/lib/esm/function/algebra/simplify/wildcards.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { isConstantNode, isFunctionNode, isOperatorNode, isParenthesisNode } from '../../../utils/is.js';
|
||||
export { isConstantNode, isSymbolNode as isVariableNode } from '../../../utils/is.js';
|
||||
export function isNumericNode(x) {
|
||||
return isConstantNode(x) || isOperatorNode(x) && x.isUnary() && isConstantNode(x.args[0]);
|
||||
}
|
||||
export function isConstantExpression(x) {
|
||||
if (isConstantNode(x)) {
|
||||
// Basic Constant types
|
||||
return true;
|
||||
}
|
||||
if ((isFunctionNode(x) || isOperatorNode(x)) && x.args.every(isConstantExpression)) {
|
||||
// Can be constant depending on arguments
|
||||
return true;
|
||||
}
|
||||
if (isParenthesisNode(x) && isConstantExpression(x.content)) {
|
||||
// Parenthesis are transparent
|
||||
return true;
|
||||
}
|
||||
return false; // Probably missing some edge cases
|
||||
}
|
||||
Reference in New Issue
Block a user