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 #90

Merged
merged 1 commit into from
Mar 21, 2018
Merged

Commits on Feb 22, 2018

  1. Avoid using deprecated Buffer constructor

    Use Buffer.allocUnsafe directly on Node.js >= 4.5.0
    This usecase doesn't need zero-filling, as is properly filled with the
    parent buffer.
    
    This behaves exactly the same as Buffer(number) on 4.x and 6.x, 
    and slightly faster that Buffer(number) on 8.x and above, as doesn't
    perform zero-fill.
    
    Older Node.js versions (<4.5.0) use the old code path.
    
    Refs:
    https://nodejs.org/api/deprecations.html#deprecations_dep0005_buffer_constructor
    ChALkeR authored Feb 22, 2018
    Configuration menu
    Copy the full SHA
    2d90739 View commit details
    Browse the repository at this point in the history