title: How to await the on 'end' event of a Node Stream API?
body: <p>I need to wait for the task of this API to finish before moving to the next task.
  How would I add a promise / await to this syntax?</p>
  <p>I need to use the enqueue function and then wait for the stream to complete before continuing any further code. I have tried returning a promise withing the .on('end', {}) call but with no luck.</p>
  <p>Any help is much appreciated.</p>
  <pre><code>const {SiteChecker} = require('broken-link-checker');
  
  const siteChecker = new SiteChecker(options)
    .on('error', (error) =&gt; {})
    .on('robots', (robots, customData) =&gt; {})
    .on('html', (tree, robots, response, pageURL, customData) =&gt; {})
    .on('queue', () =&gt; {})
    .on('junk', (result, customData) =&gt; {})
    .on('link', (result, customData) =&gt; {})
    .on('page', (error, pageURL, customData) =&gt; {})
    .on('site', (error, siteURL, customData) =&gt; {})
    .on('end', () =&gt; {});
  
  siteChecker.enqueue(siteURL, customData);
  </code></pre>