diff --git a/lib/internal/buffer.js b/lib/internal/buffer.js index 20b22ad5293..372f20c7bb2 100644 --- a/lib/internal/buffer.js +++ b/lib/internal/buffer.js @@ -1036,7 +1036,7 @@ function addBufferPrototypeMethods(proto) { proto.hexSlice = hexSlice; proto.ucs2Slice = ucs2Slice; proto.utf8Slice = utf8Slice; - proto.asciiWrite = function(string, offset = 0, length = this.byteLength) { + proto.asciiWrite = function asciiWrite(string, offset = 0, length = this.byteLength) { if (offset < 0 || offset > this.byteLength) { throw new ERR_BUFFER_OUT_OF_BOUNDS('offset'); } @@ -1047,7 +1047,7 @@ function addBufferPrototypeMethods(proto) { }; proto.base64Write = base64Write; proto.base64urlWrite = base64urlWrite; - proto.latin1Write = function(string, offset = 0, length = this.byteLength) { + proto.latin1Write = function latin1Write(string, offset = 0, length = this.byteLength) { if (offset < 0 || offset > this.byteLength) { throw new ERR_BUFFER_OUT_OF_BOUNDS('offset'); } @@ -1058,7 +1058,7 @@ function addBufferPrototypeMethods(proto) { }; proto.hexWrite = hexWrite; proto.ucs2Write = ucs2Write; - proto.utf8Write = function(string, offset = 0, length = this.byteLength) { + proto.utf8Write = function utf8Write(string, offset = 0, length = this.byteLength) { if (offset < 0 || offset > this.byteLength) { throw new ERR_BUFFER_OUT_OF_BOUNDS('offset'); }