MCPcopy Index your code
hub / github.com/josdejong/mathjs / createMakeNodeFunction

Function createMakeNodeFunction

src/function/algebra/simplify/util.js:184–199  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

182 }
183
184 function createMakeNodeFunction (node) {
185 if (isOperatorNode(node)) {
186 return function (args) {
187 try {
188 return new OperatorNode(node.op, node.fn, args, node.implicit)
189 } catch (err) {
190 console.error(err)
191 return []
192 }
193 }
194 } else {
195 return function (args) {
196 return new FunctionNode(new SymbolNode(node.name), args)
197 }
198 }
199 }
200
201 return {
202 createMakeNodeFunction,

Callers 5

_canonicalizeRuleFunction · 0.85
getSplitsFunction · 0.85
foldFractionFunction · 0.85
unflattenrFunction · 0.85
unflattenlFunction · 0.85

Calls 1

isOperatorNodeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…