From 572533cc338811fd216d14b3416f502b6b6fe719 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 11 Apr 2024 22:34:43 -0700 Subject: [PATCH] [Refactor] `utils`: use `+=` --- lib/utils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index 1e545381..c86b160f 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -161,17 +161,17 @@ var encode = function encode(str, defaultEncoder, charset, kind, format) { } if (c < 0x80) { - out = out + hexTable[c]; + out += hexTable[c]; continue; } if (c < 0x800) { - out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); + out += hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]; continue; } if (c < 0xD800 || c >= 0xE000) { - out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); + out += hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; continue; }