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

Method setOwnIdx

object_template.go:438–446  ·  view source on GitHub ↗
(p valueInt, v Value, throw bool)

Source from the content-addressed store, hash-verified

436}
437
438func (a *templatedArrayObject) setOwnIdx(p valueInt, v Value, throw bool) bool {
439 if !a.templatedObject.setOwnStr(p.string(), v, throw) {
440 return false
441 }
442 if idx := toIdx(p); idx != math.MaxUint32 {
443 a._setOwnIdx(idx)
444 }
445 return true
446}
447
448func (a *templatedArrayObject) defineOwnPropertyStr(name unistring.String, descr PropertyDescriptor, throw bool) bool {
449 if name == "length" {

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