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

Method hasOwnPropertyStr

array.go:320–326  ·  view source on GitHub ↗
(name unistring.String)

Source from the content-addressed store, hash-verified

318}
319
320func (a *arrayObject) hasOwnPropertyStr(name unistring.String) bool {
321 if idx := strToArrayIdx(name); idx != math.MaxUint32 {
322 return idx < uint32(len(a.values)) && a.values[idx] != nil
323 } else {
324 return a.baseObject.hasOwnPropertyStr(name)
325 }
326}
327
328func (a *arrayObject) hasOwnPropertyIdx(idx valueInt) bool {
329 if idx := toIdx(idx); idx != math.MaxUint32 {

Callers

nothing calls this directly

Calls 2

strToArrayIdxFunction · 0.85
hasOwnPropertyStrMethod · 0.65

Tested by

no test coverage detected