Skip to content

Commit b9a16e9

Browse files
LiviaMedeirosaduh95
authored andcommitted
buffer: give names to Buffer.prototype.*Write() functions
PR-URL: #58258 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jordan Harband <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ulises Gascón <[email protected]>
1 parent 5c36510 commit b9a16e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/internal/buffer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ function addBufferPrototypeMethods(proto) {
10361036
proto.hexSlice = hexSlice;
10371037
proto.ucs2Slice = ucs2Slice;
10381038
proto.utf8Slice = utf8Slice;
1039-
proto.asciiWrite = function(string, offset = 0, length = this.byteLength) {
1039+
proto.asciiWrite = function asciiWrite(string, offset = 0, length = this.byteLength) {
10401040
if (offset < 0 || offset > this.byteLength) {
10411041
throw new ERR_BUFFER_OUT_OF_BOUNDS('offset');
10421042
}
@@ -1047,7 +1047,7 @@ function addBufferPrototypeMethods(proto) {
10471047
};
10481048
proto.base64Write = base64Write;
10491049
proto.base64urlWrite = base64urlWrite;
1050-
proto.latin1Write = function(string, offset = 0, length = this.byteLength) {
1050+
proto.latin1Write = function latin1Write(string, offset = 0, length = this.byteLength) {
10511051
if (offset < 0 || offset > this.byteLength) {
10521052
throw new ERR_BUFFER_OUT_OF_BOUNDS('offset');
10531053
}
@@ -1058,7 +1058,7 @@ function addBufferPrototypeMethods(proto) {
10581058
};
10591059
proto.hexWrite = hexWrite;
10601060
proto.ucs2Write = ucs2Write;
1061-
proto.utf8Write = function(string, offset = 0, length = this.byteLength) {
1061+
proto.utf8Write = function utf8Write(string, offset = 0, length = this.byteLength) {
10621062
if (offset < 0 || offset > this.byteLength) {
10631063
throw new ERR_BUFFER_OUT_OF_BOUNDS('offset');
10641064
}

0 commit comments

Comments
 (0)