types

package
v0.0.0-...-8b448f3 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TypeFunc        = reflect.TypeOf((func(sobek.FunctionCall) sobek.Value)(nil))
	TypeInt         = reflect.TypeOf(int64(0))
	TypeFloat       = reflect.TypeOf(0.0)
	TypeString      = reflect.TypeOf("")
	TypeBytes       = reflect.TypeOf(([]byte)(nil))
	TypeArrayBuffer = reflect.TypeOf(sobek.ArrayBuffer{})
	TypeError       = reflect.TypeOf((*error)(nil)).Elem()
	TypePromise     = reflect.TypeOf((*sobek.Promise)(nil))
	TypeNil         = reflect.TypeOf(nil)
)
View Source
var (
	IsNumber = sobek.IsNumber
	IsString = sobek.IsString
	IsBigInt = sobek.IsBigInt
)

Functions

func IsFunc

func IsFunc(value sobek.Value) bool

IsFunc check value is a function

func IsPromise

func IsPromise(value sobek.Value) bool

IsPromise check value is sobek.Promise.

func IsTypedArray

func IsTypedArray(rt *sobek.Runtime, value sobek.Value) bool

IsTypedArray returns true if the value is a TypedArray.

func IsUint8Array

func IsUint8Array(rt *sobek.Runtime, value sobek.Value) bool

IsUint8Array returns true if the value is a Uint8Array.

func Iterator

func Iterator(rt *sobek.Runtime, seq iter.Seq[any]) *sobek.Object

Iterator returns a JavaScript iterator

func New

func New(rt *sobek.Runtime, name string, args ...sobek.Value) *sobek.Object

New create a new object from the constructor name

Types

This section is empty.

Jump to

Keyboard shortcuts

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