if (typeof Handlebars !== 'undefined') {
  Handlebars.registerHelper("timeago", function(date) {
    var dateObj;
    if (date) {
      dateObj = new Date(date);
      return $.timeago(dateObj).replace(/\ /g, "\u00a0");
    }
    return "some time ago";
  });
}

if (typeof Handlebars !== 'undefined') {
  Handlebars.registerHelper("timeago", function(date, options) {
    override = options.hash['default']
    var dateObj;
    if (date) {
      dateObj = new Date(date);
      return $.timeago(dateObj).replace(/\ /g, "\u00a0");
    }
    if (override == undefined) {
      return "some time ago";
    } else {
      return override;
    }
  });
}


Allow a default wording to be passed in as an option instead of forcing 'some time ago'
Allow a default wording to be passed in as an option instead of forcing 'some time ago'
