« get me outta code hell

store node data in its own property (cur: 51k/sec) - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/upd8.js
diff options
context:
space:
mode:
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
commit8adc9f202a17578102ccbd3c4989757fdb42cd72 (patch)
treee3baa022290efa1a2b2996ef1db587cb8cccf7e2 /upd8.js
parent5eb59b15d7edbdeeb366b9ee248ae1045a326d8a (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-xupd8.js2
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}).`);