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

Method stringKeys

array.go:305–318  ·  view source on GitHub ↗
(all bool, accum []Value)

Source from the content-addressed store, hash-verified

303}
304
305func (a *arrayObject) stringKeys(all bool, accum []Value) []Value {
306 for i, prop := range a.values {
307 name := strconv.Itoa(i)
308 if prop != nil {
309 if !all {
310 if prop, ok := prop.(*valueProperty); ok && !prop.enumerable {
311 continue
312 }
313 }
314 accum = append(accum, asciiString(name))
315 }
316 }
317 return a.baseObject.stringKeys(all, accum)
318}
319
320func (a *arrayObject) hasOwnPropertyStr(name unistring.String) bool {
321 if idx := strToArrayIdx(name); idx != math.MaxUint32 {

Callers

nothing calls this directly

Calls 2

asciiStringTypeAlias · 0.85
stringKeysMethod · 0.65

Tested by

no test coverage detected