Documentation
¶
Overview ¶
Package buffer provides a QuickJS-native Buffer implementation.
Index ¶
- Constants
- func Bytes(ctx *quickjs.Context, value *quickjs.Value) ([]byte, error)
- func DecodeBytes(ctx *quickjs.Context, value, encoding *quickjs.Value) ([]byte, error)
- func EncodeBytes(ctx *quickjs.Context, data []byte, encoding *quickjs.Value) *quickjs.Value
- func InstallGlobal(ctx *quickjs.Context) error
- func Module() module.Definition
- func WrapBytes(ctx *quickjs.Context, data []byte) *quickjs.Value
Constants ¶
View Source
const ModuleName = "buffer"
Variables ¶
This section is empty.
Functions ¶
func DecodeBytes ¶
DecodeBytes copies bytes from a string or binary value using encoding.
func EncodeBytes ¶
EncodeBytes returns an encoded string, or a Buffer when encoding is absent.
func InstallGlobal ¶
InstallGlobal installs a fresh Buffer constructor on globalThis.
func Module ¶
func Module() module.Definition
Module returns the memory-backed ESM definition for buffer and node:buffer.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.