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

Function ExampleObject_Export_map

builtin_map_test.go:143–154  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141}
142
143func ExampleObject_Export_map() {
144 vm := New()
145 m, err := vm.RunString(`
146 new Map([[1, true], [2, false]]);
147 `)
148 if err != nil {
149 panic(err)
150 }
151 exp := m.Export()
152 fmt.Printf("%T, %v\n", exp, exp)
153 // Output: [][2]interface {}, [[1 true] [2 false]]
154}
155
156func ExampleRuntime_ExportTo_mapToMap() {
157 vm := New()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.85
RunStringMethod · 0.80
ExportMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…