From 8adc9f202a17578102ccbd3c4989757fdb42cd72 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 15 Apr 2021 13:22:53 -0300 Subject: store node data in its own property (cur: 51k/sec) Another place to avoid destructuring (actually the spread operator, i.e. effectively an Object.assign call). --- upd8.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upd8.js b/upd8.js index b610fa8..76a4e59 100755 --- a/upd8.js +++ b/upd8.js @@ -979,7 +979,7 @@ const replacerSpec = { const tagArgumentValue = '='; const tagLabel = '|'; - const makeNode = (i, type, props) => ({i, type, ...props}); + const makeNode = (i, type, data) => ({i, type, data}); const makeError = (i, message) => makeNode(i, 'error', {message}); const endOfInput = (i, comment) => makeError(i, `Unexpected end of input (${comment}).`); -- cgit 1.3.0-6-gf8a5