Max Schmeling

Async / Await

This is all about the new javascript syntax for working with promises.

const fs = require('fs');

async function download(url) {
  const data = await request.get(url);

  const filePath = 'path/to/file';

  await fs.save(data, filePath);

  return filePath;
}