title: Determine if a string contains a substring within an array [NODEJS]
body: <p>I am attempting to create a search function which should be able to find multiple file types given various search parameters.</p>
  
  <p>For example i'd like to feed my application the following filter array ['.ini', '.exe', 'dsak_'] and compare each file found against that array to determine if the filename includes one of those strings</p>
  
  <p>Currently I am using the following code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>for(var i = 0; i &lt; filter.length; i++){
    if(file.includes(filter[i])) results.push(file);
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>But I was hoping to see if there was a better way to achieve this?</p>