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

Method _toString

src/expression/node/AccessorNode.js:179–186  ·  view source on GitHub ↗

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

(options)

Source from the content-addressed store, hash-verified

177 * @return {string}
178 */
179 _toString (options) {
180 let object = this.object.toString(options)
181 if (needParenthesis(this.object)) {
182 object = '(' + object + ')'
183 }
184 const optionalChaining = this.optionalChaining ? (this.index.dotNotation ? '?' : '?.') : ''
185 return object + optionalChaining + this.index.toString(options)
186 }
187
188 /**
189 * Get HTML representation

Callers

nothing calls this directly

Calls 2

needParenthesisFunction · 0.70
toStringMethod · 0.65

Tested by

no test coverage detected