jsre

package
v0.0.0-...-5d85a61 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BigNumber_JS = deps.MustAsset("bignumber.js")
	Web3_JS      = deps.MustAsset("web3.js")
)
View Source
var (
	FunctionColor = color.New(color.FgMagenta).SprintfFunc()
	SpecialColor  = color.New(color.Bold).SprintfFunc()
	NumberColor   = color.New(color.FgRed).SprintfFunc()
	StringColor   = color.New(color.FgGreen).SprintfFunc()
	ErrorColor    = color.New(color.FgHiRed).SprintfFunc()
)

Functions

This section is empty.

Types

type JSRE

type JSRE struct {
	// contains filtered or unexported fields
}

func New

func New(assetPath string, output io.Writer) *JSRE

func (*JSRE) Bind

func (self *JSRE) Bind(name string, v interface{}) error

func (*JSRE) Compile

func (self *JSRE) Compile(filename string, src interface{}) (err error)

func (*JSRE) CompleteKeywords

func (jsre *JSRE) CompleteKeywords(line string) []string

func (*JSRE) Do

func (self *JSRE) Do(fn func(*otto.Otto))

func (*JSRE) Evaluate

func (self *JSRE) Evaluate(code string, w io.Writer) error

func (*JSRE) Exec

func (self *JSRE) Exec(file string) error

func (*JSRE) Get

func (self *JSRE) Get(ns string) (v otto.Value, err error)

func (*JSRE) Run

func (self *JSRE) Run(code string) (v otto.Value, err error)

func (*JSRE) Set

func (self *JSRE) Set(ns string, v interface{}) (err error)

func (*JSRE) Stop

func (self *JSRE) Stop(waitForCallbacks bool)

Directories

Path Synopsis
Package deps contains the console JavaScript dependencies Go embedded.
Package deps contains the console JavaScript dependencies Go embedded.

Jump to

Keyboard shortcuts

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