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

Updated a couple of solutions to use newer ways to instantiate node buffers #28

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mpmckenna8
Copy link

Changed the solutions to a couple of the exercises to use the non-deprecated way to create node buffers. It is kind of confusing because you do still use like

const arr = new Uint16Array(20);

In a browser but in the node docs say to use Buffer.from(stufftomakebuffer) or Buffer.alloc(size) to make new buffers. Though using new Buffer should work for the for a while yet. Maybe both kinds of solutions should be shown because new Buffer() is used a lot?

see: https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_buffer

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.

None yet

1 participant