Skip to content

Commit

Permalink
buffer: backport new buffer constructor APIs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jasnell committed Mar 23, 2016
1 parent 90c2063 commit ad5e145
Show file tree
Hide file tree
Showing 5 changed files with 1,951 additions and 120 deletions.
Loading

0 comments on commit ad5e145

Please sign in to comment.