{"size": 793, "ext": "js", "max_stars_repo_path": "app/scripts/controllers/HomeCtrl.js", "max_stars_repo_name": "nehemiahnewell/Blocitoff", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/scripts/controllers/HomeCtrl.js", "max_issues_repo_name": "nehemiahnewell/Blocitoff", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/scripts/controllers/HomeCtrl.js", "max_forks_repo_name": "nehemiahnewell/Blocitoff", "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": 26.4333333333, "max_line_length": 75, "alphanum_fraction": 0.6090794451}
/*global angular*/
/*global firebase*/
(function() {
  function HomeCtrl($scope, $firebaseArray, Task) {
    this.tasks = Task.getTasks();
    this.fresh = Task.getFreshTasks();
    this.old = Task.getOldTasks();
    this.currentview = 1;
    this.postText = "";
    this.postPriority = "low";
    this.postIt = function()
    {
      Task.send(this.postText,this.postPriority);
    };
    this.retire = function(idcode)
    {
      var deadRecord = this.tasks.$getRecord(idcode);
      deadRecord.sentAt = 0;
      this.tasks.$save(deadRecord);
    };
    this.dateOut = function(epoch)
    {
      var when = new Date(epoch);
      return when.toLocaleString();
    };
  }
  angular
    .module('toDoDestroy')
    .controller('HomeCtrl', ["$scope", "$firebaseArray","Task", HomeCtrl]);
})();