Skip to content

Instantly share code, notes, and snippets.

@micha149
Created August 31, 2015 08: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 micha149/e0531fe345ed2011b416 to your computer and use it in GitHub Desktop.
Save micha149/e0531fe345ed2011b416 to your computer and use it in GitHub Desktop.
Javascript Promises + ES6 arrow functions = ♥
return repo.getHeadCommit()
.then(commit => commit.getTree())
.then(tree => tree.getEntry('bla/foo/bar'))
.then(entry => entry.getTree())
.then(tree => makeThings(repo, tree))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment