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

Method hasOwnPropertyStr

object_dynamic.go:678–686  ·  view source on GitHub ↗
(u unistring.String)

Source from the content-addressed store, hash-verified

676}
677
678func (a *dynamicArray) hasOwnPropertyStr(u unistring.String) bool {
679 if u == "length" {
680 return true
681 }
682 if idx, ok := strToInt(u); ok {
683 return a._has(idx)
684 }
685 return false
686}
687
688func (a *dynamicArray) hasOwnPropertyIdx(v valueInt) bool {
689 return a._has(toIntStrict(int64(v)))

Callers 2

hasPropertyStrMethod · 0.95
deleteStrMethod · 0.95

Calls 2

_hasMethod · 0.95
strToIntFunction · 0.85

Tested by

no test coverage detected