<commit_before>'use strict'
var merge = require('lodash/object/merge')

exports.properties = {
  subscriptions: true
}

exports.define = {
  sendSubscriptions (observable, hub, data, stamp) {
    // console.log('SEND IT OUT--->', data)
    if (!this.hasOwnProperty('subscriptions')) {
      this.subscriptions = {}
    }

    // console.log(data)
    var path = observable.syncPath.join('.')
    var connection = this.connection && this.connection.origin
    var subscription = { [path || '$']: data }
    // this only one ofcourse weird
    merge(this.subscriptions, subscription)
    if (connection && connection.connected && connection.upstream._input) {
      console.warn('CONNECTED RDY TO SUBSCRIBE', data)
      let set = {
        client: {
          subscriptions: subscription,
          val: this.val
        },
        stamp: stamp
      }
      let scope = this.parent.parent.adapter.scope.val
      if (scope) {
        set.scope = scope
      }
      connection.push(set)
    } else {
      // console.warn('NOT CONNECTED DO NOTHING', this.subscriptions)
    }
  }
}<commit_msg>removed logs<commit_after>'use strict'
var merge = require('lodash/object/merge')

exports.properties = {
  subscriptions: true
}

exports.define = {
  sendSubscriptions (observable, hub, data, stamp) {
    // console.log('SEND IT OUT--->', data)
    if (!this.hasOwnProperty('subscriptions')) {
      this.subscriptions = {}
    }

    // console.log(data)
    var path = observable.syncPath.join('.')
    var connection = this.connection && this.connection.origin
    var subscription = { [path || '$']: data }
    // this only one ofcourse weird
    merge(this.subscriptions, subscription)
    if (connection && connection.connected && connection.upstream._input) {
      // console.warn('CONNECTED RDY TO SUBSCRIBE', data)
      let set = {
        client: {
          subscriptions: subscription,
          val: this.val
        },
        stamp: stamp
      }
      let scope = this.parent.parent.adapter.scope.val
      if (scope) {
        set.scope = scope
      }
      connection.push(set)
    } else {
      // console.warn('NOT CONNECTED DO NOTHING', this.subscriptions)
    }
  }
}
{'fraction_non_alphanumeric': 0.13345521023765997, 'fraction_numerical': 0.0, 'mean_word_length': 2.458135860979463, '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': '7120609', 'n_tokens_mistral': 653, 'n_tokens_neox': 650, 'n_words': 145}