mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
Add docs for buffer.fill()
This commit is contained in:
1 parent
5e1b7cadb4
commit
00aee73692
1 file changed
+10
@@ -363,3 +363,13 @@ format. Note, `value` must be a valid 16 bit signed integer.
|
||||
|
||||
Works as `buffer.writeUInt832, except value is written out as a two's complement
|
||||
signed integer into `buffer`.
|
||||
|
||||
|
||||
### buffer.fill(value, offset=0, length=-1)
|
||||
|
||||
Fills the buffer with the specified value. If the offset and length are not
|
||||
given it will fill the entire buffer.
|
||||
|
||||
var b = new Buffer(50);
|
||||
b.fill("h");
|
||||
|
||||
Reference in new issue
Block a user