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

Method getOwnPropIdx

array.go:170–179  ·  view source on GitHub ↗
(idx valueInt)

Source from the content-addressed store, hash-verified

168}
169
170func (a *arrayObject) getOwnPropIdx(idx valueInt) Value {
171 if i := toIdx(idx); i != math.MaxUint32 {
172 if i < uint32(len(a.values)) {
173 return a.values[i]
174 }
175 return nil
176 }
177
178 return a.baseObject.getOwnPropStr(idx.string())
179}
180
181func (a *arrayObject) sortLen() int {
182 return len(a.values)

Callers 2

getIdxMethod · 0.95
setForeignIdxMethod · 0.95

Calls 3

toIdxFunction · 0.85
getOwnPropStrMethod · 0.65
stringMethod · 0.65

Tested by

no test coverage detected