Skip to content

Instantly share code, notes, and snippets.

💭
that's my status, over

Théo champion theochampion

💭
that's my status, over
Block or report user

Report or block theochampion

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@theochampion
theochampion / asyncEnrich.js
Created Feb 23, 2018
Enrich data using ES2016 async/await
View asyncEnrich.js
async function get(type) {
const rottentomatoesResponse = await fetch(`https://www.rottentomatoes.com/api/private/v2.0/browse?sortBy=popularity&type=${type}`)
const json = await rottentomatoesResponse.json()
const titles = json.results.map(element => {
return {
url: element.url,
title: element.title.split(':')[0]
}
});
You can’t perform that action at this time.