Skip to content

Instantly share code, notes, and snippets.

@timhettler
timhettler / PivtoTable.js
Created October 7, 2020 04:00
Create a look up for a table with key value pairs
function pivotTable(table) {
const map = new Map();
table.forEach(row => { map.set(row.key, row.value); })
return map
}
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions