title: use string "includes()" in switch Javascript case
body: <p>In Javascript, is there a way to achieve something similar to this ?</p>
  
  <pre><code>const databaseObjectID = "someId"; // like "product/217637"
  
  switch(databaseObjectID) {
      case includes('product'): actionOnProduct(databaseObjectID); break;
      case includes('user'): actionOnUser(databaseObjectID); break;
      // .. a long list of different object types
  }
  </code></pre>
  
  <p>This is more a curiosity question to understand the possibilities of switch / case, as in this particular case I have solved my problem using <code>const type = databaseObjectID.split('/')[0];</code> and apply the switch case on <code>type</code></p>