<commit_before>'use strict';

var fs = require('fs')

/**
 * Wraps server fetching
 * @param {string} url
 * @param {function} cb
 */
module.exports = (url, cb) => {
  //TODO: implement proper server fetching
  cb(null, fs.readFileSync(__dirname + '/../stubs/geojson1.json', 'utf8'))
}
<commit_msg>Fix ajax wrapper to parse json into object<commit_after>'use strict';

var fs = require('fs')

/**
 * Wraps server fetching
 * @param {string} url
 * @param {function} cb
 */
module.exports = (url, cb) => {
  //TODO: implement proper server fetching
  cb(null, JSON.parse(fs.readFileSync(__dirname + '/../stubs/geojson1.json', 'utf8')))
}

{'fraction_non_alphanumeric': 0.17739403453689168, 'fraction_numerical': 0.006279434850863423, 'mean_word_length': 4.0236220472440944, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '717871', 'n_tokens_mistral': 222, 'n_tokens_neox': 220, 'n_words': 59}