@@ -1164,16 +1164,17 @@ changes:
1164
1164
description: The `encoding` parameter is supported now.
1165
1165
-->
1166
1166
1167
- * ` value ` {string|Buffer|integer} The value to fill ` buf ` with.
1168
- * ` offset ` {integer} Number of bytes to skip before starting to fill ` buf ` . ** Default:** ` 0 ` .
1169
- * ` end ` {integer} Where to stop filling ` buf ` (not inclusive). ** Default:** [ ` buf.length ` ] .
1170
- * ` encoding ` {string} If ` value ` is a string, this is its encoding.
1167
+ * ` value ` {string|Buffer|integer} The value with which to fill ` buf ` .
1168
+ * ` offset ` {integer} Number of bytes to skip before starting to fill ` buf ` .
1169
+ ** Default:** ` 0 ` .
1170
+ * ` end ` {integer} Where to stop filling ` buf ` (not inclusive). ** Default:**
1171
+ [ ` buf.length ` ] .
1172
+ * ` encoding ` {string} The encoding for ` value ` if ` value ` is a string.
1171
1173
** Default:** ` 'utf8' ` .
1172
1174
* Returns: {Buffer} A reference to ` buf ` .
1173
1175
1174
1176
Fills ` buf ` with the specified ` value ` . If the ` offset ` and ` end ` are not given,
1175
- the entire ` buf ` will be filled. This is meant to be a small simplification to
1176
- allow the creation and filling of a ` Buffer ` to be done on a single line.
1177
+ the entire ` buf ` will be filled:
1177
1178
1178
1179
``` js
1179
1180
// Fill a `Buffer` with the ASCII character 'h'.
@@ -1184,10 +1185,10 @@ console.log(b.toString());
1184
1185
// Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
1185
1186
```
1186
1187
1187
- ` value ` is coerced to a ` uint32 ` value if it is not a String or Integer .
1188
+ ` value ` is coerced to a ` uint32 ` value if it is not a string or integer .
1188
1189
1189
1190
If the final write of a ` fill() ` operation falls on a multi-byte character,
1190
- then only the first bytes of that character that fit into ` buf ` are written.
1191
+ then only the bytes of that character that fit into ` buf ` are written:
1191
1192
1192
1193
``` js
1193
1194
// Fill a `Buffer` with a two-byte character.
0 commit comments