Reads keys written one JSON line each, {"item": {"id": ...}, "key": ...}, the latest key for an item winning.
A key of 1 to n is that action's place; 0 or "none" is none. Any other key is left out and its id returned in unread.
Parameters
lines: string
actions: number
Returns { keys: Map<string, number | null>; unread: string[]; }
Reads keys written one JSON line each,
{"item": {"id": ...}, "key": ...}, the latest key for an item winning. A key of 1 to n is that action's place; 0 or "none" is none. Any other key is left out and its id returned inunread.