<commit_before>/**
 * Created by michael on 11/13/14.
 */

(function (LowlaDB) {
  'use strict';

  var data = {};

  // Public API
  MemoryDatastore.prototype.scanDocuments = scanDocuments;
  MemoryDatastore.prototype.transact = transact;
  MemoryDatastore.prototype.loadDocument = loadDocument;
  MemoryDatastore.prototype.updateDocument = updateDocument;
  MemoryDatastore.prototype.close = closeDb;
  MemoryDatastore.prototype.countAll = countAll;

  LowlaDB.registerDatastore('Memory', new MemoryDatastore());
  return LowlaDB;
  ///////////////

  function MemoryDatastore() {
    if (!(this instanceof MemoryDatastore)) {
      return new MemoryDatastore();
    }
  }

  function _copyObj(obj) {
    if (obj) {
      var copy = {};
      LowlaDB.utils.keys(obj).forEach(function (key) {
        if (typeof obj[key] === 'object') {<commit_msg>Proper handling of arrays in the Memory datastore.<commit_after>/**
 * Created by michael on 11/13/14.
 */

(function (LowlaDB) {
  'use strict';

  var data = {};

  // Public API
  MemoryDatastore.prototype.scanDocuments = scanDocuments;
  MemoryDatastore.prototype.transact = transact;
  MemoryDatastore.prototype.loadDocument = loadDocument;
  MemoryDatastore.prototype.updateDocument = updateDocument;
  MemoryDatastore.prototype.close = closeDb;
  MemoryDatastore.prototype.countAll = countAll;

  LowlaDB.registerDatastore('Memory', new MemoryDatastore());
  return LowlaDB;
  ///////////////

  function MemoryDatastore() {
    if (!(this instanceof MemoryDatastore)) {
      return new MemoryDatastore();
    }
  }

  function _copyObj(obj) {
    if (obj) {
      var copy = {};
      LowlaDB.utils.keys(obj).forEach(function (key) {
        if (obj[key] instanceof Array) {
          copy[key] = obj[key].slice();
        }
        else if (typeof obj[key] === 'object') {
{'fraction_non_alphanumeric': 0.1365374112506827, 'fraction_numerical': 0.006553795740032769, 'mean_word_length': 3.3207547169811322, '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': '3339136', 'n_tokens_mistral': 584, 'n_tokens_neox': 561, 'n_words': 118}