Skip to content

BinaryMiddleware

const BinaryMiddleware: object

Defined in: astrobase/src/middleware/binary.ts:7

A middleware to swap binary streams for base encoded strings.

replacer: (_, value) => unknown

Replaces a binary stream with a string representation.

The key is unused.

undefined | string | number

unknown

The value to check and replace.

unknown

A string representation of the value, or the original value if not a supported binary stream.

reviver(_, value): unknown

Revives a string representation of a binary stream into a real binary stream.

unknown

The key is unused.

unknown

The value to check and replace.

unknown

A binary stream, or the original value if not a supported string.