# Functions
FieldName Returns the JS name for an exported struct field.
FreezeObject replicates the JavaScript Object.freeze function.
GetReader tries to return an io.Reader value from an exported goja value.
MethodName Returns the JS name for an exported method.
NewInitContextError returns a new InitContextError with the provided message.
NewRandSource is copied from goja's source code: https://github.com/dop251/goja/blob/master/goja/main.go#L44 The returned RandSource is NOT safe for concurrent use: https://golang.org/pkg/math/rand/#NewSource.
RunWithPanicCatching catches panic and converts into an InterruptError error that should abort a script.
Throw a JS error; avoids re-wrapping GoErrors.
ToBytes tries to return a byte slice from compatible types.
ToString tries to return a string from compatible types.
UnwrapGojaInterruptedError returns the internal error handled by goja.
# Structs
FieldNameMapper for goja.Runtime.SetFieldNameMapper().
InitEnvironment contains properties that can be accessed by Go code executed in the k6 init context.
# Type aliases
InitContextError is an error that happened during the a test init context.