utils

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2025 License: MIT Imports: 6 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NDNdVersion string = "unknown"

NDNd version from source control Note: this is only defined in NDNd itself, not for other projects.

Functions

func AsyncFunc added in v1.5.0

func AsyncFunc(f func(this js.Value, p []js.Value) (any, error)) js.Func

func Await added in v1.5.0

func Await(promise js.Value) (val js.Value, err error)

func ConvIntPtr

func ConvIntPtr[A, B constraints.Integer](a *A) *B

ConvIntPtr converts an integer pointer to another type

func ConvertNonce

func ConvertNonce(nonce []byte) (ret optional.Optional[uint32])

func IdPtr

func IdPtr[T any](value T) *T

IdPtr is the pointer version of id: 'a->'a

func JsArrayToSlice added in v1.5.0

func JsArrayToSlice(jsSlice js.Value) []byte

func MakeTimestamp

func MakeTimestamp(t time.Time) uint64

func PrintStackTrace added in v1.5.0

func PrintStackTrace()

func Promise added in v1.5.0

func Promise() (promise js.Value, resolve func(args ...any), reject func(args ...any))

func SliceToJsArray added in v1.5.0

func SliceToJsArray(slice []byte) js.Value

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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