lib/sdam/server_selectors.js
function tagSetMatch(tagSet, serverTags) {
  const keys = Object.keys(tagSet);
  const serverTagKeys = Object.keys(serverTags);
  for (let i = 0; i < keys.length; ++i) {
    const key = keys[i];
    if (serverTagKeys.indexOf(key) === -1 || serverTags[key] !== tagSet[key]) {
      return false;
    }
  }

  return true;
}
function tagSetMatch(tagSet, serverTags) {
  const keys = Object.keys(tagSet);
  const serverTagKeys = Object.keys(serverTags);
  for (let i = 0; i < keys.length; ++i) {
    const key = keys[i];
    if (serverTagKeys.indexOf(key) === -1 || serverTags[key] !== tagSet[key]) {
      return false;
    }
  }

  return true;
}
function tagSetMatch ( tagSet , serverTags ) { const keys = Object . keys ( tagSet ) ; const serverTagKeys = Object . keys ( serverTags ) ; for ( let i = 0 ; i < keys . length ; ++ i ) { const key = keys [ i ] ; if ( serverTagKeys . indexOf ( key ) === - 1 || serverTags [ key ] !== tagSet [ key ] ) { return false ; } } return true ; }
Determines whether a server's tags match a given set of tags

@param {String[]} tagSet The requested tag set to match
@param {String[]} serverTags The server's tags
Determines whether a server s tags match a given set of tags