{"size": 455, "ext": "js", "max_stars_repo_path": "src/edit-task-mock.js", "max_stars_repo_name": "MaiRizk/To-do-list", "max_stars_repo_stars_event_min_datetime": "2021-09-01T20:26:35.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-01T20:26:35.000Z", "max_issues_repo_path": "src/edit-task-mock.js", "max_issues_repo_name": "MaiRizk/To-do-list", "max_issues_repo_issues_event_min_datetime": "2021-09-02T14:18:00.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-02T14:26:04.000Z", "max_forks_repo_path": "src/edit-task-mock.js", "max_forks_repo_name": "MaiRizk/To-do-list", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 35.0, "max_line_length": 66, "alphanum_fraction": 0.6945054945}
// eslint-disable-next-line import/prefer-default-export
export const editTask = {
  init(list, newDescription, index) {
    const pDescription = document.querySelector('#list li input');
    pDescription.addEventListener('keydown', () => {
      this.instance(list, newDescription, index);
    });
  },
  instance(list, newDescription, index) {
    list[index].description = newDescription;
    localStorage.setItem('task', JSON.stringify(list));
  },
};