<commit_before>var parseHeaders = require('parse-headers')
var url = require('url')
var CONTENT_TYPE_MAP = {
  'object': 'application/json',
  'string': 'text/plain'
}

function returnJSON (result, body, callback) {
  try {
    body = Buffer.from(body).toString('utf8')
    result.body = JSON.parse(body)
  } catch (e) {
    return callback(e)
  }

  callback(null, result)
}
<commit_msg>browser: superfluous Buffer.from<commit_after>var parseHeaders = require('parse-headers')
var url = require('url')
var CONTENT_TYPE_MAP = {
  'object': 'application/json',
  'string': 'text/plain'
}

function returnJSON (result, body, callback) {
  try {
    body = body.toString('utf8')
    result.body = JSON.parse(body)
  } catch (e) {
    return callback(e)
  }

  callback(null, result)
}

{'fraction_non_alphanumeric': 0.1547314578005115, 'fraction_numerical': 0.0025575447570332483, 'mean_word_length': 4.185430463576159, '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': '1936589', 'n_tokens_mistral': 270, 'n_tokens_neox': 267, 'n_words': 58}