MCPcopy
hub / github.com/josdejong/mathjs / customFunction

Function customFunction

test/unit-tests/expression/node/ParenthesisNode.test.js:156–160  ·  view source on GitHub ↗
(node, options)

Source from the content-addressed store, hash-verified

154
155 it('should stringify a ParenthesisNode with custom toString', function () {
156 const customFunction = function (node, options) {
157 if (node.type === 'ParenthesisNode') {
158 return '[' + node.content.toString(options) + ']'
159 }
160 }
161
162 const c = new math.ConstantNode(1)
163 const n = new math.ParenthesisNode(c)

Callers

nothing calls this directly

Calls 3

toStringMethod · 0.65
toHTMLMethod · 0.65
toTexMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…