title: How to use Array.prototype.some() with an async function?
body: <p>I am trying to do the following:</p>
  
  <pre><code>command.permissions.some(async permissionsKey =&gt; {
          switch (permissionsKey) {
              case "all": {
                  return true;
              }
              case "OWNER": {
                  return await msg.roomContext.isRoomOwnerId(msg.getStaticUserUID());
              }
              default: {
                  return config.users_groups[permissionsKey].includes(msg.getStaticUserUID());
              }
          }
      });
  </code></pre>
  
  <p>However it always is true because Array.prototype.some does not expect an async function so a promise is returned when the function is called. A Promise is truthy.</p>
  
  <p>I was wondering the best away to use an async function with any of the  Array.prototype functions, specifically the some function.</p>