Skip to content
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

Merged
merged 2 commits into from
Oct 29, 2017
Merged

Adding support for encoding Uint8Arrays using bin format family #59

merged 2 commits into from
Oct 29, 2017

Conversation

moozzyk
Copy link
Contributor

@moozzyk moozzyk commented Oct 19, 2017

Fixes: #58

})
})

t.end()
Copy link
Contributor Author

@moozzyk moozzyk Oct 19, 2017

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.

@moozzyk
Copy link
Contributor Author

moozzyk commented Oct 23, 2017

@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)
Copy link
Owner

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?

@moozzyk
Copy link
Contributor Author

moozzyk commented Oct 28, 2017

🆙📅

@mcollina mcollina merged commit c2a4b2c into mcollina:master Oct 29, 2017
@mcollina
Copy link
Owner

Thanks!

This was referenced Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants