How to use the dotaconstants.regions 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 / routes / mmstats.js View on Github external
function createCalls(range) {
    const calls = {};
    for (let i = 0; i < Object.keys(constants.regions).length; i++) {
      let regionName;
      for (const region in constants.regions) {
        if (constants.regions[region].matchgroup === i + '') {
          regionName = region;
          break;
        }
      }
      calls[regionName ? regionName : i] = createCall(i, range);
    }
    calls.x = function (cb) {
      redis.lrange('mmstats:time', 0, range, cb);
    };
    return calls;
  }
github odota / core / routes / mmstats.js View on Github external
function createCalls(range) {
    const calls = {};
    for (let i = 0; i < Object.keys(constants.regions).length; i++) {
      let regionName;
      for (const region in constants.regions) {
        if (constants.regions[region].matchgroup === i + '') {
          regionName = region;
          break;
        }
      }
      calls[regionName ? regionName : i] = createCall(i, range);
    }
    calls.x = function (cb) {
      redis.lrange('mmstats:time', 0, range, cb);
    };
    return calls;
  }
github odota / core / routes / mmstats.js View on Github external
function createCalls(range) {
    const calls = {};
    for (let i = 0; i < Object.keys(constants.regions).length; i++) {
      let regionName;
      for (const region in constants.regions) {
        if (constants.regions[region].matchgroup === i + '') {
          regionName = region;
          break;
        }
      }
      calls[regionName ? regionName : i] = createCall(i, range);
    }
    calls.x = function (cb) {
      redis.lrange('mmstats:time', 0, range, cb);
    };
    return calls;
  }