MCPcopy
hub / github.com/pocketbase/pocketbase / MustRegister

Function MustRegister

plugins/jsvm/jsvm.go:121–125  ·  view source on GitHub ↗

MustRegister registers the jsvm plugin in the provided app instance and panics if it fails. Example usage: jsvm.MustRegister(app, jsvm.Config{ OnInit: func(vm *goja.Runtime) { // register custom bindings vm.Set("myCustomVar", 123) }, })

(app core.App, config Config)

Source from the content-addressed store, hash-verified

119// },
120// })
121func MustRegister(app core.App, config Config) {
122 if err := Register(app, config); err != nil {
123 panic(err)
124 }
125}
126
127// Register registers the jsvm plugin in the provided app instance.
128func Register(app core.App, config Config) error {

Callers 1

mainFunction · 0.92

Calls 1

RegisterFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…