diff options
author | (quasar) nebula <towerofnix@gmail.com> | 2021-04-15 13:22:53 -0300 |
---|---|---|
committer | (quasar) nebula <towerofnix@gmail.com> | 2021-04-15 13:22:53 -0300 |
commit | 8adc9f202a17578102ccbd3c4989757fdb42cd72 (patch) | |
tree | e3baa022290efa1a2b2996ef1db587cb8cccf7e2 /upd8.js | |
parent | 5eb59b15d7edbdeeb366b9ee248ae1045a326d8a (diff) |
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).
Diffstat (limited to 'upd8.js')
-rwxr-xr-x | upd8.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/upd8.js b/upd8.js index b610fa8b..76a4e591 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}).`); |