-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
hey there, thanks for your awesome work on this library!
we're interested in switching https://github.com/replit/river from using @msgpack/msgpack to using this package instead but found a few compatibility things with serializing some specific JS values (namely preserving Uint8Array)
{
buff: Uint8Array.from([0, 42, 100, 255]),
} FAIL codec/codec.test.ts > codec -- 'binary' > example -- 'buffer test' > encodes and decodes correctly
AssertionError: expected { buff: Buffer[ 0, 42, 100, 255 ] } to strictly equal { …(1) }
- Expected
+ Received
{
- "buff": Uint8Array [
+ "buff": {
+ "data": [
0,
42,
100,
255,
],
+ "type": "Buffer",
+ },
}
with the test pretty much being packr.unpack(packr.pack(<payload>)) we were wondering if it was possible to add a compatibility flag to preserve Uint8Array?
Metadata
Metadata
Assignees
Labels
No labels