<commit_before>/**
 * Adds event listeners to DOM elements
 */
define(function (require) {
  var d3 = require("d3");
  var valuator = require("src/modules/valuator");
  var targetIndex = require("src/modules/helpers/target_index");

  return function events() {
    // Private variables
    var accessor = function (d) { return d.x; };
    var listeners = {};

    function component(selection) {
      selection.each(function (data, index) {
        var element = d3.select(this);

        d3.entries(listeners).forEach(function (e, i) {
          // Stop listening for event types that have
          // an empty listeners array or that is set to null
          if (!e.value || !e.value.length) {
            return element.on(e.key, null);
          }

          element.on(e.key, function (d, i) {
            d3.event.stopPropagation(); // => event.stopPropagation()
<commit_msg>removing unused variables<commit_after>/**
 * Adds event listeners to DOM elements
 */
define(function (require) {
  var d3 = require("d3");
  var valuator = require("src/modules/valuator");
  var targetIndex = require("src/modules/helpers/target_index");

  return function events() {
    // Private variables
    var accessor = function (d) { return d.x; };
    var listeners = {};

    function component(selection) {
      selection.each(function () {
        var element = d3.select(this);

        d3.entries(listeners).forEach(function (e) {
          // Stop listening for event types that have
          // an empty listeners array or that is set to null
          if (!e.value || !e.value.length) {
            return element.on(e.key, null);
          }

          element.on(e.key, function () {
            d3.event.stopPropagation(); // => event.stopPropagation()

{'fraction_non_alphanumeric': 0.13110102156640183, 'fraction_numerical': 0.0056753688989784334, 'mean_word_length': 2.498015873015873, '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': '7636587', 'n_tokens_mistral': 508, 'n_tokens_neox': 505, 'n_words': 139}