Last active
May 22, 2018 19:00
-
-
Save WaldoJeffers/39d9573c47c870e009367e8250a6a226 to your computer and use it in GitHub Desktop.
This file contains 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
import { map } from 'conductor' | |
const character_ids = [1, 2, 3, 4, 5] | |
const fetchCharacter = id => fetch(`https://swapi.co/api/people/${id}`).then(res => res.json()) | |
await map(fetchCharacter, characters_ids) // [{ name: 'Luke Skywalker }, { name: 'C-3PO' }, ...] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment