<commit_before>/*
 * grunt-json-replace
 * https://github.com/mikaelkaron/grunt-json-replace
 *
 * Copyright (c) 2013 <NAME>
 * Licensed under the MIT license.
 */

"use strict";

module.exports = function (grunt) {
	var UNDEFINED;
	var TYPEOF_OBJECT = typeof {};
	var REPLACE = "replace";
	var SPACE = "space";

	function walk(node, replace) {
		var result;

		switch (typeof node) {
			case TYPEOF_OBJECT:
				result = {};

				Object.keys(node).forEach(function(key) {
					result[key] = walk(node[key], replace && replace[key]);
				});
				break;

			default:<commit_msg>Use `grunt.util.kindOf` to detect type. Closes mikaelkaron/grunt-json-replace#1<commit_after>/*
 * grunt-json-replace
 * https://github.com/mikaelkaron/grunt-json-replace
 *
 * Copyright (c) 2013 <NAME>
 * Licensed under the MIT license.
 */

"use strict";

module.exports = function (grunt) {
	var UNDEFINED;
	var REPLACE = "replace";
	var SPACE = "space";

	function walk(node, replace) {
		var result;

		switch (grunt.util.kindOf(node)) {
			case "object" :
				result = {};

				Object.keys(node).forEach(function(key) {
					result[key] = walk(node[key], replace && replace[key]);
				});
				break;

			default:
{'fraction_non_alphanumeric': 0.15494137353433834, 'fraction_numerical': 0.007537688442211055, 'mean_word_length': 3.509433962264151, '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': '5750796', 'n_tokens_mistral': 476, 'n_tokens_neox': 413, 'n_words': 93}