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

Method stringKeys

destruct.go:250–264  ·  view source on GitHub ↗
(all bool, accum []Value)

Source from the content-addressed store, hash-verified

248}
249
250func (d *destructKeyedSource) stringKeys(all bool, accum []Value) []Value {
251 var next iterNextFunc
252 if all {
253 next = d.iterateStringKeys()
254 } else {
255 next = (&enumerableIter{
256 o: d.wrapped.ToObject(d.r),
257 wrapped: d.iterateStringKeys(),
258 }).next
259 }
260 for item, next := next(); next != nil; item, next = next() {
261 accum = append(accum, item.name)
262 }
263 return accum
264}
265
266func (d *destructKeyedSource) filterUsedKeys(keys []Value) []Value {
267 k := 0

Callers

nothing calls this directly

Calls 2

iterateStringKeysMethod · 0.95
ToObjectMethod · 0.65

Tested by

no test coverage detected