doc: update Buffer(size) documentation

It returns zero-filled memory since v8.0.0.

PR-URL: https://github.com/nodejs/node/pull/33198
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Nikolai Vavilov
2020-05-01 17:00:00 +03:00
committed by Anna Henningsen
parent f153081d26
commit dbad1b6515

View File

@@ -2529,9 +2529,7 @@ changes:
* `size` {integer} The desired length of the new `Buffer`.
See [`Buffer.alloc()`][] and [`Buffer.allocUnsafe()`][]. This variant of the
constructor is equivalent to [`Buffer.allocUnsafe()`][], although using
[`Buffer.alloc()`][] is recommended in code paths that are not critical to
performance.
constructor is equivalent to [`Buffer.alloc()`][].
### `new Buffer(string[, encoding])`
<!-- YAML