title: Suppressing `Buffer() is deprecated` warning
body: <p>How can I suppress <em>only</em> the <code>Buffer() is deprecated</code> warnings in Node.js, without losing other warnings?</p>
  <pre><code>ERROR   (node:8) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
  </code></pre>
  <p>I know that <code>Buffer()</code> is deprecated, and none of my code uses it, but I have dependencies far down the chain that are using it, and I can't immediately fix this, so I'd like to silence the warnings, because they are automatically sent to Slack and it makes it hard to see real errors from my application.</p>
  <p>I have tried:</p>
  <pre class="lang-js prettyprint-override"><code>    process.on('warning', (warning) =&gt; {
        if (!warning.message.includes('Buffer() is deprecated')) {
          console.error(warning);
        }
      });
  </code></pre>
  <p>But this had no effect. I guess that this notice is sent via some other mechanism.</p>
  <p>I have looked at what is required to fix all the dependencies that are calling <code>new Buffer()</code> but there are many, some that haven't accepted PRs for years, with failing tests in the main branch etc, so it's not an easy undertaking. Besides, it would take time for all the PRs to be accepted, merged, make their way up the chain. In the mean time, I don't want alerts in Slack every 30 seconds for something I can't do anything about.</p>