Skip to content

Instantly share code, notes, and snippets.

@cowboyd
Created October 30, 2019 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cowboyd/570ab116e077c81c64f3ded389274c7f to your computer and use it in GitHub Desktop.
Save cowboyd/570ab116e077c81c64f3ded389274c7f to your computer and use it in GitHub Desktop.
Dump an effection `Fork`
export function dump(fork: any, indent = '') {
return `Fork {
state: ${fork.state}
operation: ${fork.operation.name}
children:
${[...fork.children].map(child => dump(child, ' ' + indent)).join("\n")}
}`.split("\n").map(line => `${indent}${line}`).join("\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment