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

Method setOwnIdx

array_sparse.go:218–224  ·  view source on GitHub ↗
(idx valueInt, val Value, throw bool)

Source from the content-addressed store, hash-verified

216}
217
218func (a *sparseArrayObject) setOwnIdx(idx valueInt, val Value, throw bool) bool {
219 if idx := toIdx(idx); idx != math.MaxUint32 {
220 return a._setOwnIdx(idx, val, throw)
221 }
222
223 return a.baseObject.setOwnStr(idx.string(), val, throw)
224}
225
226func (a *sparseArrayObject) setForeignStr(name unistring.String, val, receiver Value, throw bool) (bool, bool) {
227 return a._setForeignStr(name, a.getOwnPropStr(name), val, receiver, throw)

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