MCPcopy Create free account
hub / github.com/dop251/goja / _getIdx

Method _getIdx

array_sparse.go:88–95  ·  view source on GitHub ↗
(idx uint32)

Source from the content-addressed store, hash-verified

86}
87
88func (a *sparseArrayObject) _getIdx(idx uint32) Value {
89 i := a.findIdx(idx)
90 if i < len(a.items) && a.items[i].idx == idx {
91 return a.items[i].value
92 }
93
94 return nil
95}
96
97func (a *sparseArrayObject) getStr(name unistring.String, receiver Value) Value {
98 return a.getStrWithOwnProp(a.getOwnPropStr(name), name, receiver)

Callers 2

getOwnPropStrMethod · 0.95
getOwnPropIdxMethod · 0.95

Calls 1

findIdxMethod · 0.95

Tested by

no test coverage detected