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

Method isObjectProperty

src/expression/node/IndexNode.js:151–155  ·  view source on GitHub ↗

* Test whether this IndexNode contains a single property name * @return {boolean}

()

Source from the content-addressed store, hash-verified

149 * @return {boolean}
150 */
151 isObjectProperty () {
152 return this.dimensions.length === 1 &&
153 isConstantNode(this.dimensions[0]) &&
154 typeof this.dimensions[0].value === 'string'
155 }
156
157 /**
158 * Returns the property name if IndexNode contains a property.

Callers 11

constructorMethod · 0.95
getObjectPropertyMethod · 0.95
Index.test.jsFile · 0.80
_compileMethod · 0.80
nameMethod · 0.80
_compileMethod · 0.80
nameMethod · 0.80
_compileMethod · 0.80
accessFactoryFunction · 0.80
assignFactoryFunction · 0.80
MatrixIndex.jsFile · 0.80

Calls 1

isConstantNodeFunction · 0.90

Tested by

no test coverage detected