package
0.0.0-20231204172717-b0039aa655e3
Repository: https://github.com/onlpsec/gojs.git
Documentation: pkg.go.dev

# Packages

Package ast declares types representing a JavaScript AST.
Package file encapsulates the file abstractions used by the ast & parser.
Package ftoa provides ECMAScript-compliant floating point number conversion to string.
Package parser implements a parser for JavaScript.
Package token defines constants representing the lexical tokens of JavaScript (ECMA5).
Package unistring contains an implementation of a hybrid ASCII/UTF-16 string.

# Functions

AssertConstructor checks if the Value is a constructor and returns a Constructor.
AssertFunction checks if the Value is a function and returns a Callable.
Compile creates an internal representation of the JavaScript code that can be later run using the Runtime.RunProgram() method.
CompileAST creates an internal representation of the JavaScript code that can be later run using the Runtime.RunProgram() method.
IsInfinity returns true if the supplied is (+/-)Infinity.
IsNaN returns true if the supplied value is NaN.
IsNull returns true if the supplied Value is null.
IsUndefined returns true if the supplied Value is undefined.
MustCompile is like Compile but panics if the code cannot be compiled.
NaN returns a JS NaN value.
NegativeInf returns a JS -Inf value.
New creates an instance of a Javascript runtime that can be used to run code.
NewSharedDynamicArray is similar to Runtime.NewDynamicArray but the resulting Object can be shared across multiple Runtimes.
NewSharedDynamicObject is similar to Runtime.NewDynamicObject but the resulting Object can be shared across multiple Runtimes.
No description provided by the author
Null returns JS null value.
Parse takes a source string and produces a parsed AST.
PositiveInf returns a JS +Inf value.
StartProfile enables execution time profiling for all Runtimes within the current process.
StopProfile stops the current profile initiated by StartProfile, if any.
StringFromUTF16 creates a string value from an array of UTF-16 code units.
TagFieldNameMapper returns a FieldNameMapper that uses the given tagName for struct fields and optionally uncapitalises (making the first letter lower case) method names.
No description provided by the author
UncapFieldNameMapper returns a FieldNameMapper that uncapitalises struct field and method names making the first letter lower case.
Undefined returns JS undefined value.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

ArrayBuffer is a Go wrapper around ECMAScript ArrayBuffer.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Program is an internal, compiled representation of code which is produced by the Compile function.
Promise is a Go wrapper around ECMAScript Promise.
No description provided by the author
Proxy is a Go wrapper around ECMAScript Proxy.
ProxyTrapConfig provides a simplified Go-friendly API for implementing Proxy traps.
No description provided by the author
No description provided by the author
No description provided by the author
StringBuilder serves similar purpose to strings.Builder, except it works with ECMAScript String.
*Symbol is a Value containing ECMAScript Symbol primitive.

# Interfaces

AsyncContextTracker is a handler that allows to track an async execution context to ensure it remains consistent across all callback invocations.
DynamicArray is an interface representing a handler for a dynamic array Object.
DynamicObject is an interface representing a handler for a dynamic Object.
FieldNameMapper provides custom mapping between Go and JavaScript property names.
JsonEncodable allows custom JSON encoding by JSON.stringify() Note that if the returned value itself also implements JsonEncodable, it won't have any effect.
String represents an ECMAScript string Value.
Value represents an ECMAScript value.

# Type aliases

Callable represents a JavaScript function that can be called from Go.
Constructor is a type that can be used to call constructors.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author