jsutil

package module
v0.0.0-...-5b96247 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2020 License: MIT Imports: 6 Imported by: 0

README

Utility packages for use in js,wasm environment. Repository not actively maintained.

Running the tests requires node.

Documentation

Rendered for js/wasm

Overview

Package jsutil provides general functionality for any application running on wasm.

Index

Constants

This section is empty.

Variables

View Source
var (
	IsWorker bool
)

IsWorker boolean

Functions

func ConsoleLog

func ConsoleLog(args ...interface{})

ConsoleLog console.log

func CreateURLObject

func CreateURLObject(data interface{}, mime string) js.Value

CreateURLObject creates an url object from javascript source.

func Dump

func Dump(args ...interface{})

Dump deep dumps to console.

func Sdump

func Sdump(args ...interface{}) string

Sdump deep prints to string.

func SliceToByteSlice

func SliceToByteSlice(s interface{}) (b []byte)

SliceToByteSlice creates a slice of bytes from numeric slices.

Types

type ByteDecoder

type ByteDecoder struct{}

ByteDecoder decodes bytes into various slices.

func (*ByteDecoder) Float32Slice

func (d *ByteDecoder) Float32Slice(b []byte) []float32

func (*ByteDecoder) Float64Slice

func (d *ByteDecoder) Float64Slice(b []byte) []float64

func (*ByteDecoder) Int16Slice

func (d *ByteDecoder) Int16Slice(b []byte) []int16

func (*ByteDecoder) Int32Slice

func (d *ByteDecoder) Int32Slice(b []byte) []int32

func (*ByteDecoder) Int64Slice

func (d *ByteDecoder) Int64Slice(b []byte) []int64

func (*ByteDecoder) Int8Slice

func (d *ByteDecoder) Int8Slice(b []byte) []int8

func (*ByteDecoder) Uint16Slice

func (d *ByteDecoder) Uint16Slice(b []byte) []uint16

func (*ByteDecoder) Uint32Slice

func (d *ByteDecoder) Uint32Slice(b []byte) []uint32

func (*ByteDecoder) Uint64Slice

func (d *ByteDecoder) Uint64Slice(b []byte) []uint64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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