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

Method _toString

src/expression/node/FunctionNode.js:385–396  ·  view source on GitHub ↗

* Get string representation * @param {Object} options * @return {string} str

(options)

Source from the content-addressed store, hash-verified

383 * @return {string} str
384 */
385 _toString (options) {
386 const args = this.args.map(function (arg) {
387 return arg.toString(options)
388 })
389
390 const fn = isFunctionAssignmentNode(this.fn)
391 ? ('(' + this.fn.toString(options) + ')')
392 : this.fn.toString(options)
393
394 // format the arguments like "add(2, 4.2)"
395 return fn + '(' + args.join(', ') + ')'
396 }
397
398 /**
399 * Get a JSON representation of the node

Callers

nothing calls this directly

Calls 3

isFunctionAssignmentNodeFunction · 0.90
mapMethod · 0.65
toStringMethod · 0.65

Tested by

no test coverage detected