Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Compile = goja.Compile MustCompile = goja.MustCompile IsNaN = goja.IsNaN IsString = goja.IsString IsBigInt = goja.IsBigInt IsNumber = goja.IsNumber IsInfinity = goja.IsInfinity IsUndefined = goja.IsUndefined IsNull = goja.IsNull )
Function aliases from goja for script compilation and type checking.
Functions ¶
This section is empty.
Types ¶
type AstProgram ¶
Type aliases from goja for convenient access.
func Parse ¶
func Parse(name, src string) (*AstProgram, error)
Parse parses JavaScript source code into an AST.
type Runtime ¶
Type aliases from goja for convenient access.
func New ¶
New creates a new JavaScript runtime with preloaded standard libraries.
The runtime is configured with:
- Source maps disabled for better performance
- JSON struct tag mapping for Go-JavaScript interop
- Global libraries: dayjs, Big, utils, validator
Returns an error if any library fails to load.
WARNING: The returned Runtime is NOT thread-safe. Each goroutine should create its own runtime instance.
Click to show internal directories.
Click to hide internal directories.