Skip to content

Instantly share code, notes, and snippets.

View vunderkind's full-sized avatar
🤖
Becoming turing-complete

mogwai. vunderkind

🤖
Becoming turing-complete
View GitHub Profile
@vunderkind
vunderkind / machine.js
Last active June 30, 2023 20:02
Generated by XState Viz: https://xstate.js.org/viz
async function invokeFetch(context) {
console.log(context)
const { documentUrl } = context;
return await fetch(`https://google.com`)
}
const DocMachine = Machine({
id: 'doc-chat',
let company = { // the same object, compressed for brevity
sales: [{name: 'John', salary: 1000}, {name: 'Alice', salary: 1600 }],
development: {
sites: [{name: 'Peter', salary: 2000}, {name: 'Alex', salary: 1800 }],
internals: [{name: 'Jack', salary: 1300}]