<commit_before>var emitter = require('component-emitter');
var ui = require('tresdb-ui');
var template = require('./template.ejs');
var flagConfig = tresdb.config.entryFlags;

module.exports = function (selectedFlags) {

  // Setup
  var $mount = null;
  var children = {};
  var $elems = {};
  var self = this;
  emitter(self);

  self.bind = function ($mountEl) {
    $mount = $mountEl;

    console.log('selectedFlags', selectedFlags);

    $mount.html(template({
      flagBoxes: flagConfig.map(function (flagName) {
        return {
          flag: flagName,
          checked: selectedFlags.indexOf(flagName) > -1,
        };
      }),
    }));
  };

  self.getFlags = function () {
    if ($mount) {
      // Find selected flags
      var checkedFlags = $mount
        .find('input:checked')
        .map(function (i, boxEl) {
          return boxEl.value;
        })
        .get();
      return checkedFlags;
    }
    return [];
  };

  self.unbind = function () {<commit_msg>Remove debug log<commit_after>var emitter = require('component-emitter');
var ui = require('tresdb-ui');
var template = require('./template.ejs');
var flagConfig = tresdb.config.entryFlags;

module.exports = function (selectedFlags) {

  // Setup
  var $mount = null;
  var children = {};
  var $elems = {};
  var self = this;
  emitter(self);

  self.bind = function ($mountEl) {
    $mount = $mountEl;

    $mount.html(template({
      flagBoxes: flagConfig.map(function (flagName) {
        return {
          flag: flagName,
          checked: selectedFlags.indexOf(flagName) > -1,
        };
      }),
    }));
  };

  self.getFlags = function () {
    if ($mount) {
      // Find selected flags
      var checkedFlags = $mount
        .find('input:checked')
        .map(function (i, boxEl) {
          return boxEl.value;
        })
        .get();
      return checkedFlags;
    }
    return [];
  };

  self.unbind = function () {
{'fraction_non_alphanumeric': 0.15012987012987014, 'fraction_numerical': 0.001038961038961039, 'mean_word_length': 2.337954939341421, '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': '5096323', 'n_tokens_mistral': 600, 'n_tokens_neox': 586, 'n_words': 132}