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

Avoid using deprecated Buffer constructor #24

Merged
merged 1 commit into from
Feb 22, 2018

Conversation

ChALkeR
Copy link
Contributor

@ChALkeR ChALkeR commented Feb 22, 2018

Buffer.concat([]) returns an empty buffer all the way down to Node.js 0.8.x.
This also makes the linter happier and removes an // eslint-disable-line

Refs:
https://nodejs.org/api/deprecations.html#deprecations_dep0005_buffer_constructor

Buffer.concat([]) returns an empty buffer all the way down to 0.8.x.
This also makes the linter happier and removes an // eslint-disable-line

Refs:
https://nodejs.org/api/deprecations.html#deprecations_dep0005_buffer_constructor
@ChALkeR
Copy link
Contributor Author

ChALkeR commented Feb 22, 2018

Alternatively, Buffer.alloc(0) or Buffer.from('') would work there, but they require Node.js ≥ 4.5.0.

CI checks are unrelated, in fact, this PR makes lint a bit happier (as that // eslint-disable-line didn't help).

@kevva kevva merged commit aaee185 into sindresorhus:master Feb 22, 2018
@kevva
Copy link
Contributor

kevva commented Feb 22, 2018

Looks good to me. Thanks! 👍

@ChALkeR
Copy link
Contributor Author

ChALkeR commented Mar 2, 2018

Tracking: nodejs/node#19079

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

2 participants