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

Function NewModuleBuilder

module.go:37–42  ·  view source on GitHub ↗

============================================================================= MODULE BUILDER API ============================================================================= NewModuleBuilder creates a new ModuleBuilder with the specified name This is the entry point for building JavaScript modules

(name string)

Source from the content-addressed store, hash-verified

35// NewModuleBuilder creates a new ModuleBuilder with the specified name
36// This is the entry point for building JavaScript modules
37func NewModuleBuilder(name string) *ModuleBuilder {
38 return &ModuleBuilder{
39 name: name,
40 exports: make([]ModuleExportEntry, 0),
41 }
42}
43
44// Export adds an export to the module
45// This is the core method that handles all types of exports including default

Calls

no outgoing calls