Async await vs promises syntax
Javascript
// async/await syntax
module.exports = async function (url, pattern) {
  let data = await crawl(url)
  return parse(data, pattern)
}

// alternative Promise/then syntax
module.exports = function (url, pattern, jar) {
  return crawl(url, false, jar)
    .then(data => {
      return parse(data, pattern)
    })
}