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

Method setValues

array_sparse.go:275–285  ·  view source on GitHub ↗
(values []Value, objCount int)

Source from the content-addressed store, hash-verified

273}
274
275func (a *sparseArrayObject) setValues(values []Value, objCount int) {
276 a.items = make([]sparseArrayItem, 0, objCount)
277 for i, val := range values {
278 if val != nil {
279 a.items = append(a.items, sparseArrayItem{
280 idx: uint32(i),
281 value: val,
282 })
283 }
284 }
285}
286
287func (a *sparseArrayObject) hasOwnPropertyStr(name unistring.String) bool {
288 if idx := strToArrayIdx(name); idx != math.MaxUint32 {

Callers 1

expandMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected