<commit_before>var _ = require('./vendor/lodash-custom.js');
var Template = require('../templates/section.html');
var CommentTemplate = require('../templates/comment.html');
var mobileCheck = require('./helpers/mobile-check.js');
var timeago = require('timeago');
var confirm = require('confirmation');
var t = require('t');
var trunkata = require('trunkata');
var classes = require('classes');
var closest = require('closest');
var o = require('dom');

var time = timeago('.ago', { lang: this.locale, interval: 10000 });

/**
 * Creates a new Section object, which is responsible for managing a
 * single comment section.
 * @param {Object} eventPipe The Emitter object used for passing around events.
 * @param {Array} comments   The array of comments for this section. Optional.
 */
function Section( eventPipe, $el, currentUser, comments, options ) {
  this.eventPipe = eventPipe;
  this.$el = $el;
  this.comments = comments ? comments.comments : [];
  this.currentUser = currentUser || null;
  this.clickEventName = mobileCheck() ? 'touchstart' : 'click';
  this.locale = options.locale || options.trans.locale || 'en';
  this.voting = options.voting || false;

  this.id = $el.data('section-id');<commit_msg>Remove specifying timeago.interval since default is good enough<commit_after>var _ = require('./vendor/lodash-custom.js');
var Template = require('../templates/section.html');
var CommentTemplate = require('../templates/comment.html');
var mobileCheck = require('./helpers/mobile-check.js');
var timeago = require('timeago');
var confirm = require('confirmation');
var t = require('t');
var trunkata = require('trunkata');
var classes = require('classes');
var closest = require('closest');
var o = require('dom');

var time = timeago('.ago', { lang: this.locale });

/**
 * Creates a new Section object, which is responsible for managing a
 * single comment section.
 * @param {Object} eventPipe The Emitter object used for passing around events.
 * @param {Array} comments   The array of comments for this section. Optional.
 */
function Section( eventPipe, $el, currentUser, comments, options ) {
  this.eventPipe = eventPipe;
  this.$el = $el;
  this.comments = comments ? comments.comments : [];
  this.currentUser = currentUser || null;
  this.clickEventName = mobileCheck() ? 'touchstart' : 'click';
  this.locale = options.locale || options.trans.locale || 'en';
  this.voting = options.voting || false;

  this.id = $el.data('section-id');
{'fraction_non_alphanumeric': 0.15468940316686966, 'fraction_numerical': 0.0020300446609825416, 'mean_word_length': 4.690531177829099, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2793169', 'n_tokens_mistral': 709, 'n_tokens_neox': 698, 'n_words': 214}