BinaryMiddleware
const
BinaryMiddleware:object
Defined in: astrobase/src/middleware/binary.ts:7
A middleware to swap binary streams for base encoded strings.
Type declaration
Section titled “Type declaration”replacer()
Section titled “replacer()”replacer: (
_
,value
) =>unknown
Replaces a binary stream with a string representation.
Parameters
Section titled “Parameters”The key is unused.
undefined
| string
| number
unknown
The value to check and replace.
Returns
Section titled “Returns”unknown
A string representation of the value, or the original value if not a supported binary stream.
reviver()
Section titled “reviver()”reviver(
_
,value
):unknown
Revives a string representation of a binary stream into a real binary stream.
Parameters
Section titled “Parameters”unknown
The key is unused.
unknown
The value to check and replace.
Returns
Section titled “Returns”unknown
A binary stream, or the original value if not a supported string.