<commit_before>
var connectionString = 'localhost/ambition',
  mongojs = require('mongojs'),
  db = mongojs(connectionString, ['people','postcodeLookup']);


/**
 * Adds a person to the database.
 */
module.exports.addPerson = function (person, callback) {
  db.people.insert(person, callback);
}

module.exports.listAllPeople = function (callback) {
  db.people.find().toArray(callback);
}

module.exports.listByThing = function (thing, id, callback) {
  var query = {};
  query[thing] = id;
  db.people.find(query).toArray(callback);
}

module.exports.listByQueryObject = function (query, callback) {
  console.log(query);
  db.people.find(query, callback);
}

/**
 * Gets a list of distinct postcodes from the database.
 */
module.exports.getDistinct = function (thing, callback) {
  db.people
    .distinct(thing, callback);
}

/**
 * Replace a user object with a fully(?) populated user object
 */
module.exports.replaceWithObject = function (id, personWithData, callback) {
  db.people.save({'_id': id}, personWithData, callback);
}

module.exports.findOne = function (thing, callback) {
  db.people
    .findOne(thing, callback);
}


module.exports.updatePerson = function (id, user) {
  db.people
    .update({facebookId:id}, user);
}

/**
 * Get internet rating from the postcode database.
 */
module.exports.getPostCodeInfo = function (postcode, callback) {
	db.postcodeLookup.findOne({'postcode' : postcode}, callback);

}

module.exports.getPostCodeNSPL = function(){
    db.nspl.findOne({'postcode' : postcode}, callback);
}



<commit_msg>Fix derp<commit_after>
var connectionString = 'localhost/ambition',
  mongojs = require('mongojs'),
  db = mongojs(connectionString, ['people','postcodeLookup']);


/**
 * Adds a person to the database.
 */
module.exports.addPerson = function (person, callback) {
  db.people.insert(person, callback);
}

module.exports.listAllPeople = function (callback) {
  db.people.find().toArray(callback);
}

module.exports.listByThing = function (thing, id, callback) {
  var query = {};
  query[thing] = id;
  db.people.find(query).toArray(callback);
}

module.exports.listByQueryObject = function (query, callback) {
  console.log(query);
  db.people.find(query, callback);
}

/**
 * Gets a list of distinct postcodes from the database.
 */
module.exports.getDistinct = function (thing, callback) {
  db.people
    .distinct(thing, callback);
}

/**
 * Replace a user object with a fully(?) populated user object
 */
module.exports.replaceWithObject = function (id, personWithData, callback) {
  db.people.save({'_id': id}, personWithData, callback);
}

module.exports.findOne = function (thing, callback) {
  db.people
    .findOne(thing, callback);
}


module.exports.updatePerson = function (id, user) {
  db.people
    .update({facebookId:id}, user);
}

/**
 * Get internet rating from the postcode database.
 */
module.exports.getPostCodeInfo = function (postcode, callback) {
	db.postcodeLookup.findOne({'postcode' : postcode}, callback);

}

module.exports.getPostCodeNSPL = function(postcode, callback){
    db.nspl.findOne({'postcode' : postcode}, callback);
}




{'fraction_non_alphanumeric': 0.1484450144277012, 'fraction_numerical': 0.0, 'mean_word_length': 4.522123893805309, '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': '1715695', 'n_tokens_mistral': 1002, 'n_tokens_neox': 986, 'n_words': 222}