Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
RefugeeCountsModel.prototype._addMonthlyArrivals = function(destinationCountry, originCountry, year, month, count) {
if (year < refugeeConstants.DATA_START_YEAR) return;
var yearIndex = year - refugeeConstants.DATA_START_YEAR;
var monthIndex = month - 1;
console.assert(monthIndex >= 0 && monthIndex < 12, 'Month is between 0 and 11'); // eslint-disable-line
console.assert(yearIndex >= 0 && // eslint-disable-line
yearIndex < (refugeeConstants.DATA_END_YEAR - refugeeConstants.DATA_START_YEAR + 1),
'Year is between 0 and ' + (refugeeConstants.DATA_END_YEAR - refugeeConstants.DATA_START_YEAR + 1));
this.globalRefugees[yearIndex][monthIndex].count += count;
this.arrivedRefugeesToCountry[destinationCountry][yearIndex][monthIndex].count += count;
this.pairCountsByDestination[destinationCountry][originCountry][yearIndex][monthIndex].count += count;
this.pairCountsByOrigin[originCountry][destinationCountry][yearIndex][monthIndex].count += count;
};
VaccineCountsModel.prototype._addMonthlyArrivals = function (destinationCountry, originCountry, year, month, count) {
if (year < vaccineConstants.DATA_START_YEAR) return;
var yearIndex = year - vaccineConstants.DATA_START_YEAR;
var monthIndex = month - 1;
console.assert(monthIndex >= 0 && monthIndex < 12, 'Month is between 0 and 11'); // eslint-disable-line
console.assert(yearIndex >= 0 && // eslint-disable-line
yearIndex < (vaccineConstants.DATA_END_YEAR - vaccineConstants.DATA_START_YEAR + 1),
'Year is between 0 and ' + (vaccineConstants.DATA_END_YEAR - vaccineConstants.DATA_START_YEAR + 1));
this.globalVaccines[yearIndex][monthIndex].count += count;
this.arrivedVaccinesToCountry[destinationCountry][yearIndex][monthIndex].count += count;
this.pairCountsByDestination[destinationCountry][originCountry][yearIndex][monthIndex].count += count;
this.pairCountsByOrigin[originCountry][destinationCountry][yearIndex][monthIndex].count += count;
};
VaccineCountsModel.prototype._addMonthlyArrivals = function (destinationCountry, originCountry, year, month, count) {
if (year < vaccineConstants.DATA_START_YEAR) return;
var yearIndex = year - vaccineConstants.DATA_START_YEAR;
var monthIndex = month - 1;
console.assert(monthIndex >= 0 && monthIndex < 12, 'Month is between 0 and 11'); // eslint-disable-line
console.assert(yearIndex >= 0 && // eslint-disable-line
yearIndex < (vaccineConstants.DATA_END_YEAR - vaccineConstants.DATA_START_YEAR + 1),
'Year is between 0 and ' + (vaccineConstants.DATA_END_YEAR - vaccineConstants.DATA_START_YEAR + 1));
this.globalVaccines[yearIndex][monthIndex].count += count;
this.arrivedVaccinesToCountry[destinationCountry][yearIndex][monthIndex].count += count;
this.pairCountsByDestination[destinationCountry][originCountry][yearIndex][monthIndex].count += count;
this.pairCountsByOrigin[originCountry][destinationCountry][yearIndex][monthIndex].count += count;
};
RefugeeCountsModel.prototype._addMonthlyArrivals = function(destinationCountry, originCountry, year, month, count) {
if (year < refugeeConstants.DATA_START_YEAR) return;
var yearIndex = year - refugeeConstants.DATA_START_YEAR;
var monthIndex = month - 1;
console.assert(monthIndex >= 0 && monthIndex < 12, 'Month is between 0 and 11'); // eslint-disable-line
console.assert(yearIndex >= 0 && // eslint-disable-line
yearIndex < (refugeeConstants.DATA_END_YEAR - refugeeConstants.DATA_START_YEAR + 1),
'Year is between 0 and ' + (refugeeConstants.DATA_END_YEAR - refugeeConstants.DATA_START_YEAR + 1));
this.globalRefugees[yearIndex][monthIndex].count += count;
this.arrivedRefugeesToCountry[destinationCountry][yearIndex][monthIndex].count += count;
this.pairCountsByDestination[destinationCountry][originCountry][yearIndex][monthIndex].count += count;
this.pairCountsByOrigin[originCountry][destinationCountry][yearIndex][monthIndex].count += count;
};