MCPcopy Create free account
hub / github.com/buke/quickjs-go / ExportLiteral

Method ExportLiteral

module.go:66–68  ·  view source on GitHub ↗

ExportLiteral adds a literal export definition to the module.

(name string, value interface{})

Source from the content-addressed store, hash-verified

64
65// ExportLiteral adds a literal export definition to the module.
66func (mb *ModuleBuilder) ExportLiteral(name string, value interface{}) *ModuleBuilder {
67 return mb.ExportValue(name, MarshalSpec{Value: value})
68}
69
70// Build creates and registers the JavaScript module in the given context
71// The module will be available for import in JavaScript code

Callers 1

Calls 1

ExportValueMethod · 0.95

Tested by 1