Skip to content

Instantly share code, notes, and snippets.

@everettcaleb
Created November 30, 2018 20:45
Show Gist options
  • Save everettcaleb/b774683d3e925e1d66e5cae28c9aab3e to your computer and use it in GitHub Desktop.
Save everettcaleb/b774683d3e925e1d66e5cae28c9aab3e to your computer and use it in GitHub Desktop.
Neat fluent decomposition process with SuperAgent
req = { sends: [] }
send(...args) {
req.sends.push(...args)
}
sa = [sa, ...req.sends].reduce((sa, args) => sa.send(...args))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment