<commit_before>/*
	json-format v.1.0
	http://github.com/phoboslab/json-format

	Released under MIT license:
	http://www.opensource.org/licenses/mit-license.php
*/

(function() {
	var p = [],
		push = function( m ) { return '\\' + p.push( m ) + '\\'; };
		pop = function( m, i ) { return p[i-1] };
		tabs = function( count ) { return new Array( count + 1 ).join( '\t' ); };

	module.exports = function( json ) {
		p = [];
		var out = "",
			indent = 0;

		// Extract backslashes and strings
		json = json
			.replace( /\\./g, push )
			.replace( /(".*?"|'.*?')/g, push )
			.replace( /\s+/, '' );		

		// Indent and insert newlines
		for( var i = 0; i < json.length; i++ ) {
			var c = json.charAt(i);

			switch(c) {
				case '{':<commit_msg>pretty print to spaces<commit_after>/*
	json-format v.1.0
	http://github.com/phoboslab/json-format

	Released under MIT license:
	http://www.opensource.org/licenses/mit-license.php
*/

(function() {
	var p = [],
		push = function( m ) { return '\\' + p.push( m ) + '\\'; };
		pop = function( m, i ) { return p[i-1] };
		tabs = function( count ) { return new Array( count + 1 ).join( '   ' ); };

	module.exports = function( json ) {
		p = [];
		var out = "",
			indent = 0;

		// Extract backslashes and strings
		json = json
			.replace( /\\./g, push )
			.replace( /(".*?"|'.*?')/g, push )
			.replace( /\s+/, '' );		

		// Indent and insert newlines
		for( var i = 0; i < json.length; i++ ) {
			var c = json.charAt(i);

			switch(c) {
				case '{':
{'fraction_non_alphanumeric': 0.21619812583668005, 'fraction_numerical': 0.008032128514056224, 'mean_word_length': 2.3671171171171173, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '964363', 'n_tokens_mistral': 635, 'n_tokens_neox': 561, 'n_words': 146}