Created
May 21, 2016 01:36
-
-
Save didierfranc/3ba76f17edb6e9f5895555d735aef026 to your computer and use it in GitHub Desktop.
Fetch + ES7 Async Functions π
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const get = u => fetch(u).then(r => r.json()) | |
const profile = async() => { | |
let data = await get(url) | |
let { pseudo, email, avatar } = data | |
} | |
// π http://babeljs.io/docs/plugins/transform-runtime/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment