MCPcopy
hub / github.com/gopherjs/gopherjs / ValueOf

Function ValueOf

compiler/natives/src/reflect/reflect.go:170–175  ·  view source on GitHub ↗

gopherjs:replace

(i any)

Source from the content-addressed store, hash-verified

168
169//gopherjs:replace
170func ValueOf(i any) Value {
171 if i == nil {
172 return Value{}
173 }
174 return makeValue(rtypeOf(i), js.InternalObject(i).Get("$val"), 0)
175}
176
177//gopherjs:replace
178func ArrayOf(count int, elem Type) Type {

Callers 8

TestSelectOnInvalidFunction · 0.70
TestIssue22073Function · 0.70
TestMapIterSetFunction · 0.70
TestNestedMethodsFunction · 0.70
TestEmbeddedMethodsFunction · 0.70
SwapperFunction · 0.70
SliceMethod · 0.70
DeepEqualFunction · 0.70

Calls 4

InternalObjectFunction · 0.92
rtypeOfFunction · 0.85
makeValueFunction · 0.70
GetMethod · 0.65

Tested by 5

TestSelectOnInvalidFunction · 0.56
TestIssue22073Function · 0.56
TestMapIterSetFunction · 0.56
TestNestedMethodsFunction · 0.56
TestEmbeddedMethodsFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…