utils

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2023 License: GPL-3.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorWrapper

func ErrorWrapper(runtime *goja.Runtime, in FunctionWithError) func(call goja.FunctionCall) goja.Value

ErrorWrapper wraps goja functions and provides runtime-based error handling.

func RandomString

func RandomString() string

RandomString returns a random string of 24 characters in length

func ReturnError

func ReturnError(runtime *goja.Runtime, err error) goja.Value

ReturnError throws an interrupt error in the middle of a runtime execution

Types

type FunctionWithError

type FunctionWithError func(call goja.FunctionCall) (interface{}, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL