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

Method defineOwnPropertyIdx

array.go:457–462  ·  view source on GitHub ↗
(idx valueInt, descr PropertyDescriptor, throw bool)

Source from the content-addressed store, hash-verified

455}
456
457func (a *arrayObject) defineOwnPropertyIdx(idx valueInt, descr PropertyDescriptor, throw bool) bool {
458 if idx := toIdx(idx); idx != math.MaxUint32 {
459 return a._defineIdxProperty(idx, descr, throw)
460 }
461 return a.baseObject.defineOwnPropertyStr(idx.string(), descr, throw)
462}
463
464func (a *arrayObject) _deleteIdxProp(idx uint32, throw bool) bool {
465 if idx < uint32(len(a.values)) {

Callers

nothing calls this directly

Calls 4

_defineIdxPropertyMethod · 0.95
toIdxFunction · 0.85
defineOwnPropertyStrMethod · 0.65
stringMethod · 0.65

Tested by

no test coverage detected