<commit_before>const {getIterableObjectEntries} = require("./util");
const symbol = Symbol("required member");

class Talent {

  constructor(record) {

    Talent.copyOwnProps(this, record);
  }

  static copyOwnProps(target, source) {

    for (const [key, value] of getIterableObjectEntries(source)) {

      if ((typeof value === "symbol") && value.toString().includes("required member")) {

        target[key] = Talent.required;
      } else {

        Reflect.defineProperty(target, key, Reflect.getOwnPropertyDescriptor(source, key));
      }
    }

    return target;
  }

  static addProperty(talent, keyValue) {

    const key = Reflect.ownKeys(keyValue)[0];
    const valueDesc = Reflect.getOwnPropertyDescriptor(keyValue, key);
    const record = Talent.copyOwnProps({}, talent);

    Reflect.defineProperty(record, key, valueDesc);

    return new Talent(record);
  }

  static removeProperty(talent, key) {

    const record = Talent.copyOwnProps({}, talent);

    Reflect.deleteProperty(record, key);

    return new Talent(record);
  }

  static typeCheck(talent) {

    return talent.constructor.toString().includes("class Talent {");
  }

  static get required() {

    return symbol;
  }
}

module.exports = Talent;<commit_msg>Going back to regular type check<commit_after>const {getIterableObjectEntries} = require("./util");
const symbol = Symbol("required member");

class Talent {

  constructor(record) {

    Talent.copyOwnProps(this, record);
  }

  static copyOwnProps(target, source) {

    for (const [key, value] of getIterableObjectEntries(source)) {

      if ((typeof value === "symbol") && value.toString().includes("required member")) {

        target[key] = Talent.required;
      } else {

        Reflect.defineProperty(target, key, Reflect.getOwnPropertyDescriptor(source, key));
      }
    }

    return target;
  }

  static addProperty(talent, keyValue) {

    const key = Reflect.ownKeys(keyValue)[0];
    const valueDesc = Reflect.getOwnPropertyDescriptor(keyValue, key);
    const record = Talent.copyOwnProps({}, talent);

    Reflect.defineProperty(record, key, valueDesc);

    return new Talent(record);
  }

  static removeProperty(talent, key) {

    const record = Talent.copyOwnProps({}, talent);

    Reflect.deleteProperty(record, key);

    return new Talent(record);
  }

  static typeCheck(talent) {

    return (talent instanceof Talent);
  }

  static get required() {

    return symbol;
  }
}

module.exports = Talent;
{'fraction_non_alphanumeric': 0.12726540475231574, 'fraction_numerical': 0.0008054772452678212, 'mean_word_length': 3.6779661016949152, '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': '5746845', 'n_tokens_mistral': 765, 'n_tokens_neox': 726, 'n_words': 165}