summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorVse Mozhet Byt <vsemozhetbyt@gmail.com>2019-01-17 13:09:02 +0200
committerVse Mozhet Byt <vsemozhetbyt@gmail.com>2019-01-19 20:07:34 +0200
commitc1ac57888199ba13df7eda4912cdb53dcfb5a2ee (patch)
tree2067ddbd0407e83bceea3f9f77c8fb55ee844509 /doc/api
parent2e613a9c301165d121b19b86e382860323abc22f (diff)
downloadandroid-node-v8-c1ac57888199ba13df7eda4912cdb53dcfb5a2ee.tar.gz
android-node-v8-c1ac57888199ba13df7eda4912cdb53dcfb5a2ee.tar.bz2
android-node-v8-c1ac57888199ba13df7eda4912cdb53dcfb5a2ee.zip
doc: add a note to `buf.fill()` description
PR-URL: https://github.com/nodejs/node/pull/25547 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/buffer.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/api/buffer.md b/doc/api/buffer.md
index 0a73a1d8a9..49766866dc 100644
--- a/doc/api/buffer.md
+++ b/doc/api/buffer.md
@@ -1238,7 +1238,9 @@ console.log(b.toString());
// Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
```
-`value` is coerced to a `uint32` value if it is not a string or integer.
+`value` is coerced to a `uint32` value if it is not a string, `Buffer`, or
+integer. If the resulting integer is greater than `255` (decimal), `buf` will be
+filled with `0`.
If the final write of a `fill()` operation falls on a multi-byte character,
then only the bytes of that character that fit into `buf` are written: