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

Method put

object.go:1695–1704  ·  view source on GitHub ↗
(key *Object, value interface{})

Source from the content-addressed store, hash-verified

1693}
1694
1695func (ctx *objectExportCtx) put(key *Object, value interface{}) {
1696 if ctx.cache == nil {
1697 ctx.cache = make(map[*Object]interface{})
1698 }
1699 if item, ok := ctx.cache[key].(objectExportCacheItem); ok {
1700 item[key.self.exportType()] = value
1701 } else {
1702 ctx.cache[key] = value
1703 }
1704}
1705
1706func (ctx *objectExportCtx) putTyped(key *Object, typ reflect.Type, value interface{}) {
1707 if ctx.cache == nil {

Callers 6

exportMethod · 0.45
exportMethod · 0.45
exportMethod · 0.45
exportMethod · 0.45
exportMethod · 0.45
exportMethod · 0.45

Calls 1

exportTypeMethod · 0.65

Tested by

no test coverage detected