(all bool, accum []Value)
| 256 | } |
| 257 | |
| 258 | func (a *sparseArrayObject) stringKeys(all bool, accum []Value) []Value { |
| 259 | if all { |
| 260 | for _, item := range a.items { |
| 261 | accum = append(accum, asciiString(strconv.FormatUint(uint64(item.idx), 10))) |
| 262 | } |
| 263 | } else { |
| 264 | for _, item := range a.items { |
| 265 | if prop, ok := item.value.(*valueProperty); ok && !prop.enumerable { |
| 266 | continue |
| 267 | } |
| 268 | accum = append(accum, asciiString(strconv.FormatUint(uint64(item.idx), 10))) |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | return a.baseObject.stringKeys(all, accum) |
| 273 | } |
| 274 | |
| 275 | func (a *sparseArrayObject) setValues(values []Value, objCount int) { |
| 276 | a.items = make([]sparseArrayItem, 0, objCount) |
nothing calls this directly
no test coverage detected