<commit_before>'use strict';
/*
 * cushion-cli
 * https://github.com/stefanjudis/cushion-cli
 *
 * Copyright (c) 2012 <NAME>
 * Licensed under the MIT license.
 */

var file = module.exports = {},
    fs = require('fs'),
    path = require('path'),
    defaults = path.resolve(__dirname, '../config/defaults.json');


file._writeConnections = function(connections, callback) {
  var connectionsString = JSON.stringify(connections);

  fs.writeFile(defaults, connectionsString, callback);
};


file.defaultExists = function(callback) {
  fs.exists(defaults, callback);
};


file.getConnections = function(callback) {
  fs.readFile(defaults, callback);
};<commit_msg>added readPackageJSON commend to file helper<commit_after>'use strict';
/*
 * cushion-cli
 * https://github.com/stefanjudis/cushion-cli
 *
 * Copyright (c) 2012 <NAME>
 * Licensed under the MIT license.
 */

var file = module.exports = {},
    fs = require('fs'),
    path = require('path'),
    defaults = path.resolve(__dirname, '../config/defaults.json'),
    packageJSON = path.resolve(__dirname, '../../package.json');


file._writeConnections = function(connections, callback) {
  var connectionsString = JSON.stringify(connections);

  fs.writeFile(defaults, connectionsString, callback);
};


file.defaultExists = function(callback) {
  fs.exists(defaults, callback);
};


file.getConnections = function(callback) {
  fs.readFile(defaults, callback);
};



file.readPackageJSON = function(callback) {
  fs.readFile(packageJSON, callback);
};
{'fraction_non_alphanumeric': 0.1525759577278732, 'fraction_numerical': 0.005284015852047556, 'mean_word_length': 4.489130434782608, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '1151645', 'n_tokens_mistral': 466, 'n_tokens_neox': 441, 'n_words': 92}