<commit_before>(($) ->
  ###*
  * Bindable module
  * @name Bindable
  * @constructor
  ###
  Bindable = -> 
    eventCallbacks = {}
    
    ###*
    * The bind method adds a function as an event listener.
    *
    * @name bind
    * @methodOf Bindable#
    *
    * @param {String} event The event to listen to.
    * @param {Function} callback The function to be called when the specified event
    * is triggered.
    ###
    bind: (event, callback) ->
      eventCallbacks[event] = eventCallbacks[event] || []
      
      eventCallbacks[event].push(callback)

    ###*
    * The unbind method removes a specific event listener, or all event listeners if
    * no specific listener is given.
    *
    * @name unbind
    * @methodOf Bindable#
    *
    * @param {String} event The event to remove the listener from.
    * @param {Function} [callback] The listener to remove.
    ###
    unbind: (event, callback) ->
      eventCallbacks[event] = eventCallbacks[event] || []
      
      if callback
        eventCallbacks.remove(callback)
      else
        eventCallbacks[event] = []

    ###*
    * The trigger method calls all listeners attached to the specified event.
    *
    * @name trigger
    * @methodOf Bindable#
    *
    * @param {String} event The event to trigger.
    * @param {Array} [parameters] Additional parameters to pass to the event listener.
    ###
    trigger: (event, parameters...) ->
      callbacks = eventCallbacks[event]

      if callbacks && callbacks.length
        self = this

        callbacks.each (callback) ->
          callback.apply(self, parameters)

  window.Bindable = Bindable
)(jQuery)

<commit_msg>adding module tag for docs<commit_after>(($) ->
  ###*
  Bindable module
  @name Bindable
  @module
  ###
  Bindable = -> 
    eventCallbacks = {}

    ###*
    The bind method adds a function as an event listener.

    @name bind
    @methodOf Bindable#

    @param {String} event The event to listen to.
    @param {Function} callback The function to be called when the specified event
    is triggered.
    ###
    bind: (event, callback) ->
      eventCallbacks[event] = eventCallbacks[event] || []

      eventCallbacks[event].push(callback)

    ###*
    The unbind method removes a specific event listener, or all event listeners if
    no specific listener is given.

    @name unbind
    @methodOf Bindable#

    @param {String} event The event to remove the listener from.
    @param {Function} [callback] The listener to remove.
    ###
    unbind: (event, callback) ->
      eventCallbacks[event] = eventCallbacks[event] || []

      if callback
        eventCallbacks.remove(callback)
      else
        eventCallbacks[event] = []

    ###*
    The trigger method calls all listeners attached to the specified event.

    @name trigger
    @methodOf Bindable#

    @param {String} event The event to trigger.
    @param {Array} [parameters] Additional parameters to pass to the event listener.
    ###
    trigger: (event, parameters...) ->
      callbacks = eventCallbacks[event]

      if callbacks && callbacks.length
        self = this

        callbacks.each (callback) ->
          callback.apply(self, parameters)

  window.Bindable = Bindable
)(jQuery)


{'fraction_non_alphanumeric': 0.1065015479876161, 'fraction_numerical': 0.0, 'mean_word_length': 2.538882803943045, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '5174713', 'n_tokens_mistral': 933, 'n_tokens_neox': 904, 'n_words': 302}