From 00aee736922b1fc1fae3953f08d24ced95b8a65f Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 6 May 2011 13:42:55 -0700 Subject: [PATCH] Add docs for buffer.fill() --- doc/api/buffers.markdown | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/api/buffers.markdown b/doc/api/buffers.markdown index 68317aff03..d3f88b79c2 100644 --- a/doc/api/buffers.markdown +++ b/doc/api/buffers.markdown @@ -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"); +