Skip to main content
Public

Share visualization

Loading preview…

CSV Loader with Promises and Async+Await

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

CSV Loader with Promises and Async+Await

0
AAlark Joshi
Last edited May 22, 2020
Created on May 21, 2020
Forked from Hello HTML

This example demonstrates loading and parsing CSV data from a remote URL using the Fetch API, with the code handling the asynchronous response through both Promise chaining and async/await syntax. The browser fetches a text file containing CSS named colors from a GitHub Gist, then logs the raw comma-separated values to the console. The implementation begins with commented-out Promise-based code, followed by an `async` function that awaits the fetch and text conversion, showcasing the cleaner syntax of async/await over traditional `.then()` chains.

AI-generated description

A program that loads and parses some CSV data

Comments

Sign in to join the discussion.

MIT Licensed