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

Method setOwnIdx

array.go:206–212  ·  view source on GitHub ↗
(idx valueInt, val Value, throw bool)

Source from the content-addressed store, hash-verified

204}
205
206func (a *arrayObject) setOwnIdx(idx valueInt, val Value, throw bool) bool {
207 if i := toIdx(idx); i != math.MaxUint32 {
208 return a._setOwnIdx(i, val, throw)
209 } else {
210 return a.baseObject.setOwnStr(idx.string(), val, throw)
211 }
212}
213
214func (a *arrayObject) _setOwnIdx(idx uint32, val Value, throw bool) bool {
215 var prop Value

Callers

nothing calls this directly

Calls 4

_setOwnIdxMethod · 0.95
toIdxFunction · 0.85
setOwnStrMethod · 0.65
stringMethod · 0.65

Tested by

no test coverage detected