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

Method hasOwnPropertyIdx

string.go:312–318  ·  view source on GitHub ↗
(idx valueInt)

Source from the content-addressed store, hash-verified

310}
311
312func (s *stringObject) hasOwnPropertyIdx(idx valueInt) bool {
313 i := int64(idx)
314 if i >= 0 && i < int64(s.length) {
315 return true
316 }
317 return s.baseObject.hasOwnPropertyStr(idx.string())
318}
319
320func devirtualizeString(s String) (asciiString, unicodeString) {
321 switch s := s.(type) {

Callers

nothing calls this directly

Calls 2

hasOwnPropertyStrMethod · 0.65
stringMethod · 0.65

Tested by

no test coverage detected