Instantly share code, notes, and snippets.

Embed
What would you like to do?
// OPTION #1: no temp streamProcessor var
// fetch(...)
.then(progressHelper(console.log))
// ⚠️ OR️ ️⚠️
// OPTION #2: define a `streamProcessor` to hold our console logger
const streamProcessor = progressHelper(console.log)
// fetch(...)
.then(streamProcessor)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment