<commit_before>
var yaml = require('js-yaml')

Object.keys(yaml).forEach(function(k) {
  exports[k] = yaml[k]
})

// https://github.com/nodeca/js-yaml/pull/152
exports.stringify = yaml.safeDump
exports.parse = yaml.safeLoad<commit_msg>correct yaml exception<commit_after>
var yaml = require('js-yaml')

Object.keys(yaml).forEach(function(k) {
  exports[k] = yaml[k]
})

// https://github.com/nodeca/js-yaml/pull/152
exports.stringify = function stringify(obj, options) {
  return yaml.safeDump(obj, options)
}

exports.parse = function parse(obj, options) {
  try {
    return yaml.safeLoad(obj, options)
  } catch(orig) {
    if (orig.name === 'YAMLException') {
      var err = SyntaxError(orig.message)
      err.reason = orig.reason
      err.row    = orig.mark.line
      err.column = orig.mark.column
      err.mark   = orig.mark
    }
  }
}
{'fraction_non_alphanumeric': 0.15584415584415584, 'fraction_numerical': 0.0070838252656434475, 'mean_word_length': 3.43979057591623, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6007483', 'n_tokens_mistral': 310, 'n_tokens_neox': 295, 'n_words': 51}