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

Function _ensureNode

src/function/algebra/simplifyConstant.js:135–140  ·  view source on GitHub ↗
(thing)

Source from the content-addressed store, hash-verified

133 })
134
135 function _ensureNode (thing) {
136 if (isNode(thing)) {
137 return thing
138 }
139 return _toNode(thing)
140 }
141
142 // convert a number to a fraction only if it can be expressed exactly,
143 // and when both numerator and denominator are small enough

Callers 3

_foldAccessorFunction · 0.85
foldOpFunction · 0.85

Calls 1

isNodeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…