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

Drop unneeded reverseBuffer util method #128

Merged

Conversation

lukechilds
Copy link
Contributor

@lukechilds lukechilds commented Mar 20, 2020

In Node.js a Buffer is also a subclass of TypedArray so there's no need for a reverseBuffer util method, you can just use TypedArray.prototype.reverse() directly on a Buffer instance.

$ node
Welcome to Node.js v12.11.1.
Type ".help" for more information.
> buf = Buffer.from('Test')
<Buffer 54 65 73 74>
> buf.reverse()
<Buffer 74 73 65 54>

I haven't tested the PR because attempting to run tests or require local-index-wrapper.js just gives me Error: Cannot find module '../../keys/'.

I'm not really familiar with Dojo, I was just looking at how the importer wrappers were implemented and saw this.

@LaurentMT LaurentMT added the enhancement New feature or request label Mar 23, 2020
@kenshin-samourai kenshin-samourai merged commit 63bf633 into Samourai-Wallet:develop Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants