dataMapped = () =>
Generators.observe((notify) => {
const socket = new WebSocket("wss://dev.calyx.hr/gattaca");
socket.onmessage = (event) => {
let dataMapped = new Array();
JSON.parse(event.data).forEach((row) => {
const rowMapped = row.split("").map((d) => bases.indexOf(d));
dataMapped.push(rowMapped);
});
notify(dataMapped);
};
return () => socket.close();
})