From 419d07ff2b730383754af86d5c775de997f445e4 Mon Sep 17 00:00:00 2001 From: Fedor Nezhivoi Date: Sat, 20 Jun 2020 11:25:32 +1000 Subject: [PATCH] remove redundant latin1Write function --- index.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/index.js b/index.js index e87bfaa..80a9d1d 100644 --- a/index.js +++ b/index.js @@ -841,10 +841,6 @@ function asciiWrite (buf, string, offset, length) { return blitBuffer(asciiToBytes(string), buf, offset, length) } -function latin1Write (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - function base64Write (buf, string, offset, length) { return blitBuffer(base64ToBytes(string), buf, offset, length) } @@ -900,11 +896,9 @@ Buffer.prototype.write = function write (string, offset, length, encoding) { return utf8Write(this, string, offset, length) case 'ascii': - return asciiWrite(this, string, offset, length) - case 'latin1': case 'binary': - return latin1Write(this, string, offset, length) + return asciiWrite(this, string, offset, length) case 'base64': // Warning: maxLength not taken into account in base64Write -- 2.34.1