types

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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