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

Method getOwnPropIdx

array_sparse.go:135–140  ·  view source on GitHub ↗
(idx valueInt)

Source from the content-addressed store, hash-verified

133}
134
135func (a *sparseArrayObject) getOwnPropIdx(idx valueInt) Value {
136 if idx := toIdx(idx); idx != math.MaxUint32 {
137 return a._getIdx(idx)
138 }
139 return a.baseObject.getOwnPropStr(idx.string())
140}
141
142func (a *sparseArrayObject) add(idx uint32, val Value) {
143 i := a.findIdx(idx)

Callers 2

getIdxMethod · 0.95
setForeignIdxMethod · 0.95

Calls 4

_getIdxMethod · 0.95
toIdxFunction · 0.85
getOwnPropStrMethod · 0.65
stringMethod · 0.65

Tested by

no test coverage detected