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

Added join function #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added join function #88

wants to merge 1 commit into from

Conversation

yuyaryshev
Copy link
Contributor

Added join function defragments BufferList items into one big buffer.

Added join function defragments BufferList items into one big buffer.
Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a unit test.
CI is failing

@rvagg
Copy link
Owner

rvagg commented Dec 7, 2020

OK, so this is essentially just a bare slice() where you're mutating an existing instance rather than returning a new one (or a Buffer). It feels a little like API fluff, although there is that minor difference in the mutation which is currently not possible.

What I'd like to know is what the use-case for this is? Why is fred.join() superior to fred = BufferList(fred.slice())? What are the scenarios where you want to keep a BufferList reference that's flattened internally and not just use a Buffer?

Needs linting, a test or three, and README.md additions.

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.

4 participants