Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCurrentModuleFilePath ¶
GetCurrentModuleFilePath evaluates the runtime callstack to determine the current file path
func GetCurrentModulePath ¶
GetCurrentModulePath evaluates the runtime callstack to determine the current modules path
func GetRootCaller ¶
GetRootCaller evaluates the runtime callstack to determine the root caller
func NewGojaErrHandler ¶
func NewGojaErrHandler(runtime *goja.Runtime, f GojaErrFunc) func(call goja.FunctionCall) goja.Value
NewGojaErrHandler wraps a go function that returns an error and propagates errors to goja's runtime using panic This is not idiomatic go but its how goja was designed so instead of writing panics in our goja function we can return errors in a more idiomatic way and allow this function to panic for us
Types ¶
type GojaErrFunc ¶
type GojaErrFunc func(call goja.FunctionCall) (goja.Value, error)
GojaErrFunc our more idiomatic goja function
Click to show internal directories.
Click to hide internal directories.