This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* idea: subscribe to websocket log | |
* but get prior history via HTTP. | |
* merge history and maintain sequence. | |
* upsert fns close over a Vue ref. | |
*/ | |
const ref = x => ({value: x}); // mock Vue | |
let items = ref([]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const events = ref([]); | |
// Map() of targetId -> event list | |
const targetEvents = computed(() => events.value | |
.filter(it => it.targetId !== undefined) | |
.reduce((ax, row) => ax.update(row.targetId, new List(), | |
items => items.push(row)), | |
new Map())); | |
const compacted = computed(() => { |
OlderNewer