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

Method hasOwnPropertyIdx

array.go:328–333  ·  view source on GitHub ↗
(idx valueInt)

Source from the content-addressed store, hash-verified

326}
327
328func (a *arrayObject) hasOwnPropertyIdx(idx valueInt) bool {
329 if idx := toIdx(idx); idx != math.MaxUint32 {
330 return idx < uint32(len(a.values)) && a.values[idx] != nil
331 }
332 return a.baseObject.hasOwnPropertyStr(idx.string())
333}
334
335func (a *arrayObject) hasPropertyIdx(idx valueInt) bool {
336 if a.hasOwnPropertyIdx(idx) {

Callers 1

hasPropertyIdxMethod · 0.95

Calls 3

toIdxFunction · 0.85
hasOwnPropertyStrMethod · 0.65
stringMethod · 0.65

Tested by

no test coverage detected