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

Method constructor

src/expression/node/AccessorNode.js:55–67  ·  view source on GitHub ↗

* @constructor AccessorNode * @extends {Node} * Access an object property or get a matrix subset * * @param {Node} object The object from which to retrieve * a property or subset. * @param {IndexNode} index

(object, index, optionalChaining = false)

Source from the content-addressed store, hash-verified

53 * Forces evaluate to undefined if the given object is undefined or null.
54 */
55 constructor (object, index, optionalChaining = false) {
56 super()
57 if (!isNode(object)) {
58 throw new TypeError('Node expected for parameter "object"')
59 }
60 if (!isIndexNode(index)) {
61 throw new TypeError('IndexNode expected for parameter "index"')
62 }
63
64 this.object = object
65 this.index = index
66 this.optionalChaining = optionalChaining
67 }
68
69 // readonly property name
70 get name () {

Callers

nothing calls this directly

Calls 2

isNodeFunction · 0.90
isIndexNodeFunction · 0.90

Tested by

no test coverage detected