How to use the dotaconstants.game_mode function in dotaconstants

To help you get started, we’ve selected a few dotaconstants examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github odota / core / util / utility.js View on Github external
function isSignificant(match) {
  return Boolean(constants.game_mode[match.game_mode]
  && constants.game_mode[match.game_mode].balanced
  && constants.lobby_type[match.lobby_type]
  && constants.lobby_type[match.lobby_type].balanced
  && match.radiant_win !== undefined
  && match.duration > 360
  && (match.players || []).every(player => (player.gold_per_min || 0) < 2500));
}
github odota / core / util / utility.js View on Github external
function isSignificant(match) {
  return Boolean(constants.game_mode[match.game_mode]
  && constants.game_mode[match.game_mode].balanced
  && constants.lobby_type[match.lobby_type]
  && constants.lobby_type[match.lobby_type].balanced
  && match.radiant_win !== undefined
  && match.duration > 360
  && (match.players || []).every(player => (player.gold_per_min || 0) < 2500));
}
github odota / web / transformations / transformations.js View on Github external
  game_mode: ({ field }) => (constants.game_mode[field] ? constants.game_mode[field].name : field),
  start_time: ({ field }) => moment.unix(field).fromNow(),