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

Method defineOwnPropertyIdx

object_template.go:461–469  ·  view source on GitHub ↗
(p valueInt, desc PropertyDescriptor, throw bool)

Source from the content-addressed store, hash-verified

459}
460
461func (a *templatedArrayObject) defineOwnPropertyIdx(p valueInt, desc PropertyDescriptor, throw bool) bool {
462 if !a.templatedObject.defineOwnPropertyStr(p.string(), desc, throw) {
463 return false
464 }
465 if idx := toIdx(p); idx != math.MaxUint32 {
466 a._setOwnIdx(idx)
467 }
468 return true
469}

Callers

nothing calls this directly

Calls 4

_setOwnIdxMethod · 0.95
toIdxFunction · 0.85
defineOwnPropertyStrMethod · 0.65
stringMethod · 0.65

Tested by

no test coverage detected