{"size": 336, "ext": "js", "max_stars_repo_path": "apps/communications/contacts/test/unit/mock_image.js", "max_stars_repo_name": "m4dz/gaia", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "apps/communications/contacts/test/unit/mock_image.js", "max_issues_repo_name": "m4dz/gaia", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "apps/communications/contacts/test/unit/mock_image.js", "max_forks_repo_name": "m4dz/gaia", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 16.0, "max_line_length": 51, "alphanum_fraction": 0.630952381}
'use strict';

/* exported MockImage */

var MockImage = function() {
  this.complete = false;
  this.onload = null;
  this.onabort = null;
  this.onerror = null;
};

MockImage.prototype.triggerEvent = function(name) {
  var callback = this[name];

  if (name === 'onload') {
    this.complete = true;
  }

  callback && callback();
};
