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

Method put

object_goarray_reflect.go:39–44  ·  view source on GitHub ↗
(idx int, w reflectValueWrapper)

Source from the content-addressed store, hash-verified

37}
38
39func (c *valueArrayCache) put(idx int, w reflectValueWrapper) {
40 if len(*c) <= idx {
41 c.grow(idx + 1)
42 }
43 (*c)[idx] = w
44}
45
46func (c *valueArrayCache) shrink(newlen int) {
47 if len(*c) > newlen {

Callers 2

_getIdxMethod · 0.45
swapMethod · 0.45

Calls 1

growMethod · 0.95

Tested by

no test coverage detected