MCPcopy Index your code
hub / github.com/dop251/goja / Set

Method Set

object_dynamic.go:57–57  ·  view source on GitHub ↗

Set an item at index idx. Note that idx may be any integer, negative or beyond the current length. The expected behaviour when it's beyond length is that the array's length is increased to accommodate the item. All elements in the 'new' section of the array should be zeroed.

(idx int, val Value)

Source from the content-addressed store, hash-verified

55 // The expected behaviour when it's beyond length is that the array's length is increased to accommodate
56 // the item. All elements in the 'new' section of the array should be zeroed.
57 Set(idx int, val Value) bool
58 // SetLen is called when the array's 'length' property is changed. If the length is increased all elements in the
59 // 'new' section of the array should be zeroed.
60 SetLen(int) bool

Callers 15

TestMarshalJSONErrorFunction · 0.65
TestGomapPropFunction · 0.65
TestGomapEnumerateFunction · 0.65
TestGomapInstanceOfFunction · 0.65
TestGomapTypeOfFunction · 0.65
TestGomapProtoFunction · 0.65
TestGoMapExtensibilityFunction · 0.65
TestGoMapWithProtoFunction · 0.65

Implementers 2

testDynArrayobject_dynamic_test.go
testSharedDynArrayobject_dynamic_test.go

Calls

no outgoing calls

Tested by 15

TestMarshalJSONErrorFunction · 0.52
TestGomapPropFunction · 0.52
TestGomapEnumerateFunction · 0.52
TestGomapInstanceOfFunction · 0.52
TestGomapTypeOfFunction · 0.52
TestGomapProtoFunction · 0.52
TestGoMapExtensibilityFunction · 0.52
TestGoMapWithProtoFunction · 0.52