How to use the console-browserify.assert function in console-browserify

To help you get started, we’ve selected a few console-browserify 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 lucified / lucify-refugees / src / js / model / refugee-counts-model.js View on Github external
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;
};
github massyao / china-invalid-vaccine-flow / js / model / vaccine-counts-model.js View on Github external
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;
};
github massyao / china-invalid-vaccine-flow / js / model / vaccine-counts-model.js View on Github external
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;
};
github lucified / lucify-refugees / src / js / model / refugee-counts-model.js View on Github external
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;
};

console-browserify

Emulate console for all the browsers

MIT
Latest version published 5 years ago

Package Health Score

73 / 100
Full package analysis

Similar packages