diff options
author | (quasar) nebula <towerofnix@gmail.com> | 2021-04-15 13:20:23 -0300 |
---|---|---|
committer | (quasar) nebula <towerofnix@gmail.com> | 2021-04-15 13:21:15 -0300 |
commit | 5eb59b15d7edbdeeb366b9ee248ae1045a326d8a (patch) | |
tree | 7e0d67e9930332f6e5cc9ecfff043472a6306a00 /upd8.js | |
parent | 802b1ed64b729f95b77d48f9f024141e95d296a5 (diff) |
simplify once-used pushNode call (cur: 48.5k/sec)
The idea here is to get rid of unnecessary destructuring of the arguments array.
Diffstat (limited to 'upd8.js')
-rwxr-xr-x | upd8.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/upd8.js b/upd8.js index 7b66215e..b610fa8b 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 = ''; } }; |