js

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrThrow = errors.New("throw")

Functions

func ParseInputs

func ParseInputs(data []byte) []interface{}

Types

type Goja

type Goja struct {
	DataName string
	// contains filtered or unexported fields
}

func NewGoja

func NewGoja() Goja

func (*Goja) RunScript

func (g *Goja) RunScript(ctx context.Context, script string, inputs []interface{}) ([]byte, error)

func (*Goja) RunString

func (g *Goja) RunString(value string) (goja.Value, error)

func (*Goja) Set

func (g *Goja) Set(name string, data interface{}) error

func (*Goja) SetData

func (g *Goja) SetData(data interface{}) error

func (*Goja) SetFunction

func (g *Goja) SetFunction(name string, fn interface{})

Jump to

Keyboard shortcuts

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