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

Method _hasIdx

object_goarray_reflect.go:76–81  ·  view source on GitHub ↗
(idx valueInt)

Source from the content-addressed store, hash-verified

74}
75
76func (o *objectGoArrayReflect) _hasIdx(idx valueInt) bool {
77 if idx := int64(idx); idx >= 0 && idx < int64(o.fieldsValue.Len()) {
78 return true
79 }
80 return false
81}
82
83func (o *objectGoArrayReflect) _hasStr(name unistring.String) bool {
84 if idx := strToIdx64(name); idx >= 0 && idx < int64(o.fieldsValue.Len()) {

Callers 2

setForeignIdxMethod · 0.95
hasOwnPropertyIdxMethod · 0.95

Calls 1

LenMethod · 0.65

Tested by

no test coverage detected