3 ms·
You could do (accum, borders) => ({ ...accum, [borders.datatype]: [...(accum[borders.datatype] || []), borders] }, {}) although it's essentially c
by kevmo314 9y ago
You could do
(accum, borders) => ({
...accum,
[borders.datatype]: [...(accum[borders.datatype] || []), borders]
}, {})
although it's essentially concat().
- KirinDave 9y agoI actually like that quite a bit more. I should have thought of it. Thanks!