<commit_before>
var Membrane = require("./membrane.js");
var Internal = require("./internal.js");
var Aran = require("aran");

Reflect.unary = function (o, x) { return eval(o+" x") };
Reflect.binary = function (o, l, r) { return eval("l "+o+" r") };
Reflect.enumerate = function (o) {
  var ks = [];
  for (var k in o)
    ks.push(k);
  return ks;
};

module.exports = function (stack, wrap) {

  var membrane = Membrane(wrap);
  var internal = Internal(membrane.enter, membrane.leave);
  function internalize (x, i) {
    var p = internal(x);
    internals.set(p, x);
    return membrane.enter(p, aran.node(i));
  }
  var internals = new WeakMap();

  function get (o, k, r) {
    var b = internals.has(o);
    b && (o = internals.get(o));
    var d = Reflect.getOwnPropertyDescriptor(o, k);
    if (!d) {
      var p = Reflect.getPrototypeOf(o);
      if (p)
        return get(membrane.leave(p, "prototype"), k, r);
    }
    if ("value" in d)
      return b ? d.value : membrane.enter(d.value, "result");
    if ("get" in d)
      return Reflect.apply(d.get, r, []);
    return membrane.enter(undefined, "result");
  }

  function initialize (o, k, v) {
    var b = internals.has(o);
    b && (o = internals.get(o));
    Reflect.defineProperty(o, k, {
      configurable: true,
      enumerable: true,
      writable: true,
      value: b ? v : membrane.leave(v, 2)
    });
  }

  function set (o, k, v, r) {
    var b = internals.has(o);
    b && (o = internals.get(o));
    var d = Reflect.getOwnPropertyDescriptor(o, k);<commit_msg>convert primitive to object so get and set works on primitive<commit_after>
var Membrane = require("./membrane.js");
var Internal = require("./internal.js");
var Aran = require("aran");

Reflect.unary = function (o, x) { return eval(o+" x") };
Reflect.binary = function (o, l, r) { return eval("l "+o+" r") };
Reflect.enumerate = function (o) {
  var ks = [];
  for (var k in o)
    ks.push(k);
  return ks;
};

module.exports = function (stack, wrap) {

  var membrane = Membrane(wrap);
  var internal = Internal(membrane.enter, membrane.leave);
  function internalize (x, i) {
    var p = internal(x);
    internals.set(p, x);
    return membrane.enter(p, aran.node(i));
  }
  var internals = new WeakMap();

  function get (o, k, r) {
    var b = internals.has(o);
    b && (o = internals.get(o));
    o = Object(o);
    var d = Reflect.getOwnPropertyDescriptor(o, k);
    if (!d) {
      var p = Reflect.getPrototypeOf(o);
      if (p)
        return get(membrane.leave(p, "prototype"), k, r);
    }
    if ("value" in d)
      return b ? d.value : membrane.enter(d.value, "result");
    if ("get" in d)
      return Reflect.apply(d.get, r, []);
    return membrane.enter(undefined, "result");
  }

  function initialize (o, k, v) {
    var b = internals.has(o);
    b && (o = internals.get(o));
    Reflect.defineProperty(o, k, {
      configurable: true,
      enumerable: true,
      writable: true,
      value: b ? v : membrane.leave(v, 2)
    });
  }

  function set (o, k, v, r) {
    var b = internals.has(o);
    b && (o = internals.get(o));
    o = Object(o);
    var d = Reflect.getOwnPropertyDescriptor(o, k);
{'fraction_non_alphanumeric': 0.17256637168141592, 'fraction_numerical': 0.0006321112515802782, 'mean_word_length': 2.8644688644688645, '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': '5019058', 'n_tokens_mistral': 1169, 'n_tokens_neox': 1134, 'n_words': 317}