From 9cbeaf9ac9348f7785df1dc619bf3390ed8c1911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrg=C3=BCn=20Day=C4=B1o=C4=9Flu?= Date: Fri, 18 Oct 2024 21:21:45 +0200 Subject: [PATCH] perf: tostring bytecode --- src/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/index.js b/src/index.js index 21df0d5..6877592 100644 --- a/src/index.js +++ b/src/index.js @@ -120,7 +120,7 @@ export const htmlGenerator = function* (literals, ...expressions) { continue; } - string = String(expression); + string = `${expression}`; if (string.length !== 0) { if (!isRaw) { @@ -134,7 +134,7 @@ export const htmlGenerator = function* (literals, ...expressions) { continue; } - string = String(expression); + string = `${expression}`; } if (string.length !== 0) { @@ -149,7 +149,7 @@ export const htmlGenerator = function* (literals, ...expressions) { continue; } - string = String(expression); + string = `${expression}`; } if (literal.length !== 0 && literal.charCodeAt(literal.length - 1) === 33) { @@ -217,7 +217,7 @@ export const htmlAsyncGenerator = async function* (literals, ...expressions) { continue; } - string = String(expression); + string = `${expression}`; if (string.length !== 0) { if (!isRaw) { @@ -231,7 +231,7 @@ export const htmlAsyncGenerator = async function* (literals, ...expressions) { continue; } - string = String(expression); + string = `${expression}`; } if (string.length !== 0) { @@ -246,7 +246,7 @@ export const htmlAsyncGenerator = async function* (literals, ...expressions) { continue; } - string = String(expression); + string = `${expression}`; } if (literal.length !== 0 && literal.charCodeAt(literal.length - 1) === 33) {