{"size": 1475, "ext": "js", "max_stars_repo_path": "app/lib/handlebarsHelpers.js", "max_stars_repo_name": "kuu/Re-mix", "max_stars_repo_stars_event_min_datetime": "2015-04-19T06:25:53.000Z", "max_stars_repo_stars_event_max_datetime": "2015-04-19T06:25:53.000Z", "max_issues_repo_path": "app/lib/handlebarsHelpers.js", "max_issues_repo_name": "kuu/Re-mix", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/lib/handlebarsHelpers.js", "max_forks_repo_name": "kuu/Re-mix", "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": 32.7777777778, "max_line_length": 76, "alphanum_fraction": 0.5308474576}
/**
 * We inject the Handlebars instance, because this module doesn't know where
 * the actual Handlebars instance will come from.
 */
module.exports = function(Handlebars) {
  return {
    copyright: function(year) {
      return new Handlebars.SafeString('&copy;' + year);
    },
    math: function(lvalue, operator, rvalue) {
      lvalue = parseFloat(lvalue);
      rvalue = parseFloat(rvalue);
      return {
        '+': lvalue + rvalue,
        '-': lvalue - rvalue,
        '*': lvalue * rvalue,
        '/': lvalue / rvalue,
        '%': lvalue % rvalue
      }[operator];
    },
    ifCond: function (v1, operator, v2, options) {
      switch (operator) {
        case '===':
          return (v1 === v2) ? options.fn(this) : options.inverse(this);
        case '!==':
          return (v1 !== v2) ? options.fn(this) : options.inverse(this);
        case '<':
          return (v1 < v2) ? options.fn(this) : options.inverse(this);
        case '<=':
          return (v1 <= v2) ? options.fn(this) : options.inverse(this);
        case '>':
          return (v1 > v2) ? options.fn(this) : options.inverse(this);
        case '>=':
          return (v1 >= v2) ? options.fn(this) : options.inverse(this);
        case '&&':
          return (v1 && v2) ? options.fn(this) : options.inverse(this);
        case '||':
          return (v1 || v2) ? options.fn(this) : options.inverse(this);
        default:
          return options.inverse(this);
        }
    }
  };
};
