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

Method getOwnPropIdx

object_goarray_reflect.go:147–156  ·  view source on GitHub ↗
(idx valueInt)

Source from the content-addressed store, hash-verified

145}
146
147func (o *objectGoArrayReflect) getOwnPropIdx(idx valueInt) Value {
148 if idx := toIntStrict(int64(idx)); idx >= 0 && idx < o.fieldsValue.Len() {
149 return &valueProperty{
150 value: o._getIdx(idx),
151 writable: true,
152 enumerable: true,
153 }
154 }
155 return nil
156}
157
158func (o *objectGoArrayReflect) _putIdx(idx int, v Value, throw bool) bool {
159 cached := o.valueCache.get(idx)

Callers

nothing calls this directly

Calls 3

_getIdxMethod · 0.95
toIntStrictFunction · 0.85
LenMethod · 0.65

Tested by

no test coverage detected