From 5eb59b15d7edbdeeb366b9ee248ae1045a326d8a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 15 Apr 2021 13:20:23 -0300 Subject: simplify once-used pushNode call (cur: 48.5k/sec) The idea here is to get rid of unnecessary destructuring of the arguments array. --- upd8.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/upd8.js b/upd8.js index 7b66215..b610fa8 100755 --- a/upd8.js +++ b/upd8.js @@ -1015,10 +1015,9 @@ const replacerSpec = { let string = ''; let iString = 0; - const pushNode = (...args) => nodes.push(makeNode(...args)); const pushTextNode = () => { if (string.length) { - pushNode(iString, 'text', {string}); + nodes.push(makeNode(iString, 'text', {string})); string = ''; } }; -- cgit 1.3.0-6-gf8a5