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

Method stringKeys

object_dynamic.go:526–537  ·  view source on GitHub ↗
(all bool, accum []Value)

Source from the content-addressed store, hash-verified

524}
525
526func (o *dynamicObject) stringKeys(all bool, accum []Value) []Value {
527 keys := o.d.Keys()
528 if l := len(accum) + len(keys); l > cap(accum) {
529 oldAccum := accum
530 accum = make([]Value, len(accum), l)
531 copy(accum, oldAccum)
532 }
533 for _, key := range keys {
534 accum = append(accum, newStringValue(key))
535 }
536 return accum
537}
538
539func (*baseDynamicObject) symbols(all bool, accum []Value) []Value {
540 return accum

Callers 1

keysMethod · 0.95

Calls 2

newStringValueFunction · 0.85
KeysMethod · 0.65

Tested by

no test coverage detected