<commit_before>'use strict'

/*
 * Wrapper for node-dirty.
 * 
 * Accesses the in-memory database.
 */

var fs = require('fs');
var dirty = require('dirty')
var log = require('../log')
var uuid = require('node-uuid')

exports.list = function list(collectionName, writeResponse) {
  log.debug("listing " + collectionName)
  withCollectionDo(collectionName, function(collection) {
    var results = []
    collection.forEach(function(key, val) {
      log.debug("Entry: " + key + "; value: " + val)
      results.push(val)
    })<commit_msg>use same result structure as nstore backend<commit_after>'use strict'

/*
 * Wrapper for node-dirty.
 * 
 * Accesses the in-memory database.
 */

var fs = require('fs');
var dirty = require('dirty')
var log = require('../log')
var uuid = require('node-uuid')

exports.list = function list(collectionName, writeResponse) {
  log.debug("listing " + collectionName)
  withCollectionDo(collectionName, function(collection) {
    var results = {}
    collection.forEach(function(key, doc) {
      log.debug("Entry: " + key + "; value: " + doc)
      results[key] = doc
    })
{'fraction_non_alphanumeric': 0.1532912533814247, 'fraction_numerical': 0.0, 'mean_word_length': 3.7844827586206895, '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': '5083817', 'n_tokens_mistral': 340, 'n_tokens_neox': 337, 'n_words': 83}