<commit_before>/**
 * @class CM_StreamChannel_Definition
 * @extends CM_Frontend_JsonSerializable
 */
var CM_StreamChannel_Definition = CM_Frontend_JsonSerializable.extend({

  _class: 'CM_StreamChannel_Definition',

  /**
   * @returns {String}
   */
  getKey: function() {
    return this.get('key');
  },

  /**
   * @returns {Number}
   */
  getType: function() {
    return this.get('type');
  }
});<commit_msg>Bind/unbind stream channels from the definition<commit_after>/**
 * @class CM_StreamChannel_Definition
 * @extends CM_Frontend_JsonSerializable
 */
var CM_StreamChannel_Definition = CM_Frontend_JsonSerializable.extend({

  _class: 'CM_StreamChannel_Definition',

  /**
   * @returns {String}
   */
  getKey: function() {
    return this.get('key');
  },

  /**
   * @returns {Number}
   */
  getType: function() {
    return this.get('type');
  },

  /**
   * @param {String} eventName
   * @param {Function} callback fn(array data)
   * @param {Object} [context]
   * @param {Boolean} [allowClientMessage]
   */
  bind: function(eventName, callback, context, allowClientMessage) {
    cm.stream.bind(this.getKey(), this.getType(), eventName, callback, context, allowClientMessage);
  },

  /**
   * @param {String} [eventName]
   * @param {Function} [callback]
   * @param {Object} [context]
   */
  unbind: function(eventName, callback, context) {
    cm.stream.unbind(this.getKey(), this.getType(), eventName, callback, context);
  }
});
{'fraction_non_alphanumeric': 0.1559065934065934, 'fraction_numerical': 0.0, 'mean_word_length': 3.9222972972972974, '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': '4137433', 'n_tokens_mistral': 475, 'n_tokens_neox': 470, 'n_words': 92}