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

buffer: backport new buffer constructor APIs #5763

Closed
wants to merge 2 commits into from

Commits on Mar 23, 2016

  1. buffer: backport new buffer constructor APIs

    This backports the new `Buffer.alloc()`, `Buffer.allocUnsafe()`,
    and `Buffer.from()` APIs for v5.
    
    Also included in this backport is the change that allows fill('')
    to zero-fill (as opposed to doing nothing) and the additional
    `byteOffset` and `length` arguments for `Buffer(arrayBuffer)` and
    `Buffer.from(arrayBuffer)`.
    
    This backport includes the new test cases.
    
    This backport *does not* update all of the internal uses of the
    existing `Buffer()` constructor.
    
    This backport also *does not* include the soft deprecation of the
    existing `Buffer()` constructor.
    jasnell committed Mar 23, 2016
    Configuration menu
    Copy the full SHA
    ad5e145 View commit details
    Browse the repository at this point in the history
  2. Pull out new throws

    jasnell committed Mar 23, 2016
    Configuration menu
    Copy the full SHA
    c04c7bd View commit details
    Browse the repository at this point in the history