{"size": 522, "ext": "js", "max_stars_repo_path": "scripts/each/view.js", "max_stars_repo_name": "fremontmj/Blot", "max_stars_repo_stars_event_min_datetime": "2016-07-25T17:55:49.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-19T15:54:52.000Z", "max_issues_repo_path": "scripts/each/view.js", "max_issues_repo_name": "symmetry-allowed/Blot", "max_issues_repo_issues_event_min_datetime": "2017-08-06T13:31:14.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-28T08:29:34.000Z", "max_forks_repo_path": "scripts/each/view.js", "max_forks_repo_name": "symmetry-allowed/Blot", "max_forks_repo_forks_event_min_datetime": "2016-07-25T20:05:40.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-15T11:40:16.000Z"}
{"max_stars_count": 972, "max_issues_count": 67, "max_forks_count": 92, "avg_line_length": 26.1, "max_line_length": 62, "alphanum_fraction": 0.6187739464}
var eachTemplate = require("./template");
var Template = require("models/template");
var async = require("async");

module.exports = function (doThis, callback) {
  eachTemplate(function (user, blog, template, nextTemplate) {
    Template.getAllViews(template.id, function (err, views) {
      if (err) throw err;

      async.eachOfSeries(
        views,
        function (view, name, nextView) {
          doThis(user, blog, template, view, nextView);
        },
        nextTemplate
      );
    });
  }, callback);
};
