<commit_before>define(['moment'], function(moment) {
	var apiBaseUrl 	= 'http://v1eventstore.cloudapp.net:2113/streams/asset-',
			apiParams	 	= '/head/backward/5?embed=content',
			templateUrl	= 'http://v1commitstream.azurewebsites.net/assetDetailCommits.html';
			
	return function(selector, assetNumber) {
    var commits = [];
    var apiUrl = apiBaseUrl + assetNumber + apiParams;
    
    $.getJSON(apiUrl).done(function(events) {
      $.each(events.entries, function(index, value) {
        var e = value.content.data;
        var c = {
          timeFormatted: moment(e.commit.committer.date).fromNow(),
          author: e.commit.committer.name,
          sha1Partial: e.commit.tree.sha.substring(0,6),
          action: "committed",
          message: e.commit.message,
          commitHref: e.html_url
        };
        commits.push(c);
      });
      var data = {
        commits: commits
      };
      if (commits.length > 0) {
        $.get(templateUrl).done(function(source) {
          var template = Handlebars.compile(source);
          var content = template(data);
          $(selector).html(content);
        });
      }
    });
  }
});<commit_msg>S-47665 beautified JS<commit_after>define(['moment'], function(moment) {
    var apiBaseUrl = 'http://v1eventstore.cloudapp.net:2113/streams/asset-',
        apiParams = '/head/backward/5?embed=content',
        templateUrl = 'http://v1commitstream.azurewebsites.net/assetDetailCommits.html';

    return function(selector, assetNumber) {
        var commits = [];
        var apiUrl = apiBaseUrl + assetNumber + apiParams;

        $.getJSON(apiUrl).done(function(events) {
            $.each(events.entries, function(index, value) {
                var e = value.content.data;
                var c = {
                    timeFormatted: moment(e.commit.committer.date).fromNow(),
                    author: e.commit.committer.name,
                    sha1Partial: e.commit.tree.sha.substring(0, 6),
                    action: "committed",
                    message: e.commit.message,
                    commitHref: e.html_url
                };
                commits.push(c);
            });
            var data = {
                commits: commits
            };
            if (commits.length > 0) {
                $.get(templateUrl).done(function(source) {
                    var template = Handlebars.compile(source);
                    var content = template(data);
                    $(selector).html(content);
                });
            }
        });
    }
});
{'fraction_non_alphanumeric': 0.13315111284654432, 'fraction_numerical': 0.010542756735650137, 'mean_word_length': 1.830939226519337, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4918822', 'n_tokens_mistral': 765, 'n_tokens_neox': 723, 'n_words': 115}