{"size": 514, "ext": "js", "max_stars_repo_path": "src/components/resize.js", "max_stars_repo_name": "sutras/galaxy", "max_stars_repo_stars_event_min_datetime": "2021-05-29T13:28:16.000Z", "max_stars_repo_stars_event_max_datetime": "2021-05-29T13:28:16.000Z", "max_issues_repo_path": "src/components/resize.js", "max_issues_repo_name": "sutras/galaxy", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/resize.js", "max_forks_repo_name": "sutras/galaxy", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.724137931, "max_line_length": 72, "alphanum_fraction": 0.5447470817}
class Resize {
  constructor(host) {
    this.resizeHandler = () => {
      host.emit('resize');
    };
  }
}

export default {
  name: 'resize',
  params: {
    resize: false
  },
  create() {
    this.resize = new Resize(this);
  },
  on: {
    init() {
      if (this.params.resize) {
        window.addEventListener('resize', this.resize.resizeHandler);
      }
    },
    destroy() {
      if (this.params.resize) {
        window.removeEventListener('resize', this.resize.resizeHandler);
      }
    }
  }
};