-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for encoding Uint8Arrays using bin format family #59
Conversation
}) | ||
}) | ||
|
||
t.end() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No decoding tests since bin
family is decoded to Buffers. This code has not changed and already has test coverage.
@mcollina - friendly ping... |
lib/encoder.js
Outdated
} else if (obj && obj.readUInt32LE) { | ||
} else if (obj && (obj.readUInt32LE || obj instanceof Uint8Array)) { | ||
if (obj instanceof Uint8Array) { | ||
obj = new Buffer(obj) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the new Buffer()
constructor is depracted. Can you use Buffeer.from
?
🆙📅 |
Thanks! |
Fixes: #58