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

module.exports = function (source) {
  this.cacheable && this.cacheable();
  var res = yaml.safeLoad(source);
  return 'module.exports = ' + JSON.stringify(res, undefined, '\t');<commit_msg>Return JSON as string. yaml-loader should be chained with json-loader.<commit_after>var yaml = require('js-yaml');

module.exports = function (source) {
  this.cacheable && this.cacheable();
  var res = yaml.safeLoad(source);
  return JSON.stringify(res, undefined, '\t');
{'fraction_non_alphanumeric': 0.15913555992141454, 'fraction_numerical': 0.0, 'mean_word_length': 5.0, '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': '4760733', 'n_tokens_mistral': 160, 'n_tokens_neox': 154, 'n_words': 39}