Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
}
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;
}
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;
}