<commit_before>(function($, window, document, undefined) {

  if (!$.Rapido) {
    $.Rapido = {};
  }

  $.Rapido.Dropdown = function(el, options) {
    var base = this;

    base.$el = $(el);
    base.el = el;

    base.$el.data('Rapido.Dropdown', base);

    base.init = function() {
      base.options = $.extend({},$.Rapido.Dropdown.defaultOptions, options);

      var wrapperClass, togglerClass, str;

      // Grab and convert class name of container
      wrapperClass = $.rapido_Utilities.getClass(el);

      // Grab and convert class of the toggler button
      str = base.$el.children()[0];
      str = '.' + str.className.replace(/ /g, '.');
      str = str.substring(0, str.length - 1);

      togglerClass = str;

      if (base.options.event == 'hover') {
        toggleHover();
      } else {
        toggleClick(wrapperClass, togglerClass);
      }

      close();
    };

    // Event: Click
    var toggleClick = function(wrapperClass, togglerClass) {

      base.$el.on(base.options.event, function(e) {

        if ($(this).hasClass('open')) {
          $(this).removeClass('open');
        } else {
          $(wrapperClass).removeClass('open');
          $(this).addClass('open');
        }
      });

      base.$el.on(base.options.event, togglerClass, function(e) {
        e.preventDefault();
      });
<commit_msg>Cleaned code with rapido_Utilities.getClass function<commit_after>(function($, window, document, undefined) {

  if (!$.Rapido) {
    $.Rapido = {};
  }

  $.Rapido.Dropdown = function(el, options) {
    var base = this;

    base.$el = $(el);
    base.el = el;

    base.$el.data('Rapido.Dropdown', base);

    base.init = function() {
      base.options = $.extend({},$.Rapido.Dropdown.defaultOptions, options);

      var wrapperClass, togglerClass, str;

      // Grab and convert class name of container
      wrapperClass = $.rapido_Utilities.getClass(base.el);
      togglerClass = $.rapido_Utilities.getClass(base.el.firstElementChild);

      if (base.options.event == 'hover') {
        toggleHover();
      } else {
        toggleClick(wrapperClass, togglerClass);
      }

      close();
    };

    // Event: Click
    var toggleClick = function(wrapperClass, togglerClass) {

      base.$el.on(base.options.event, function(e) {

        if ($(this).hasClass('open')) {
          $(this).removeClass('open');
        } else {
          $(wrapperClass).removeClass('open');
          $(this).addClass('open');
        }
      });

      base.$el.on(base.options.event, togglerClass, function(e) {
        e.preventDefault();
      });

{'fraction_non_alphanumeric': 0.1653147933565083, 'fraction_numerical': 0.0011587485515643105, 'mean_word_length': 2.3856209150326797, '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': '7019161', 'n_tokens_mistral': 808, 'n_tokens_neox': 802, 'n_words': 151}