<commit_before>// Generated by CoffeeScript 1.6.3
(function() {
  var Heron, Receiver, flush_partials, make_thingy, only_keys, send_create, send_create_subkey, send_update_subkey, split_key, subkey_key,
    __slice = [].slice;

  Heron = this.Heron != null ? this.Heron : this.Heron = {};

  only_keys = function(obj, keys) {
    var k, result, _i, _len;
    result = {};
    for (_i = 0, _len = keys.length; _i < _len; _i++) {
      k = keys[_i];
      if (obj[k] == null) {
        throw "Missing key " + k;
      }
      result[k] = obj[k];
    }
    return result;
  };

  subkey_key = function(id, subkey) {
    return "" + id + "." + subkey;
  };

  split_key = function(key) {
    var id, rest, _ref;
    _ref = key.split("."), id = _ref[0], rest = 2 <= _ref.length ? __slice.call(_ref, 1) : [];
    return [id, rest.join(".")];
  };

  send_update_subkey = function(thingy, subkey) {
    var attr_names, data, domain, key, type_data;
    type_data = this._.per_type[thingy.typename()];
    attr_names = type_data.subkeys[subkey];
    data = only_keys(thingy.get.apply(thingy, attr_names), attr_names);
    key = subkey_key(thingy.id(), subkey);
    domain = this._.domain;
    if (subkey === '_') {
      data = {
        typename: thingy.typename(),
        subkeys: Heron.Util.keys(per_type.subkeys),
        attrs: data
      };
    }
    this._.dictionary.update(this._.domain, key, data);
    return null;
  };

  send_create_subkey = function(thingy, subkey) {
    var attr_keys, id, key, type_data, typename, value;
    typename = thingy.typename();
    id = thingy.id();
    type_data = this._.per_type[typename];
    attr_keys = type_data.subkeys[subkey];
    key = subkey_key(id, subkey);
    value = only_keys(thingy.get.apply(thingy, attr_keys), attr_keys);
    if (subkey === '_') {
      value = {
        typename: typename,
        attrs: value
      };
    }
    return this._.dictionary.create(this._.domain, key, value);
  };

  send_create = function(thingy) {
    var id, type_data, typename,<commit_msg>client/thingy.js: Update to match coffee script.<commit_after>// Generated by CoffeeScript 1.6.3
(function() {
  var Heron, Receiver, flush_partials, make_thingy, only_keys, send_create, send_create_subkey, send_update_subkey, split_key, subkey_key,
    __slice = [].slice;

  Heron = this.Heron != null ? this.Heron : this.Heron = {};

  only_keys = function(obj, keys) {
    var k, result, _i, _len;
    result = {};
    for (_i = 0, _len = keys.length; _i < _len; _i++) {
      k = keys[_i];
      if (obj[k] == null) {
        throw "Missing key " + k;
      }
      result[k] = obj[k];
    }
    return result;
  };

  subkey_key = function(id, subkey) {
    return "" + id + "." + subkey;
  };

  split_key = function(key) {
    var id, rest, _ref;
    _ref = key.split("."), id = _ref[0], rest = 2 <= _ref.length ? __slice.call(_ref, 1) : [];
    return [id, rest.join(".")];
  };

  send_update_subkey = function(thingy, subkey) {
    var attr_names, data, domain, key, type_data;
    type_data = this._.per_type[thingy.typename()];
    attr_names = type_data.subkeys[subkey];
    data = only_keys(thingy.get.apply(thingy, attr_names), attr_names);
    key = subkey_key(thingy.id(), subkey);
    domain = this._.domain;
    if (subkey === '_') {
      data = {
        typename: thingy.typename(),
        subkeys: Heron.Util.keys(type_data.subkeys),
        attrs: data
      };
    }
    this._.dictionary.update(this._.domain, key, data);
    return null;
  };

  send_create_subkey = function(thingy, subkey) {
    var attr_keys, id, key, type_data, typename, value;
    typename = thingy.typename();
    id = thingy.id();
    type_data = this._.per_type[typename];
    attr_keys = type_data.subkeys[subkey];
    key = subkey_key(id, subkey);
    value = only_keys(thingy.get.apply(thingy, attr_keys), attr_keys);
    if (subkey === '_') {
      value = {
        typename: typename,
        attrs: value
      };
    }
    return this._.dictionary.create(this._.domain, key, value);
  };

  send_create = function(thingy) {
    var id, type_data, typename,
{'fraction_non_alphanumeric': 0.15504631886884446, 'fraction_numerical': 0.0034129692832764505, 'mean_word_length': 2.8381665107577176, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4962656', 'n_tokens_mistral': 1504, 'n_tokens_neox': 1461, 'n_words': 316}