<commit_before>window.AdventOfCode.Day1 = ( input ) =>
{
	input = input
		.replace( /\+/g, '' )
		.split( '\n' )
		.map( ( x ) => parseInt( x, 10 ) );
	
	let index = 0;
	let seenValue = 0;
	const seen = new Map();

	do
	{
		seenValue += input[ index % input.length ];
		index++;

		if( seen.has( seenValue ) )
		{
			break;
		}

		seen.set( seenValue, true );
	}
	while( true );

	const sum = input.reduce( ( p, c ) => p + c, 0 );
	
	return [ sum, seenValue ];
};
<commit_msg>Don't need to replace pluses in js<commit_after>window.AdventOfCode.Day1 = ( input ) =>
{
	input = input
		.split( '\n' )
		.map( x => +x );
	
	let index = 0;
	let seenValue = 0;
	const seen = new Map();

	do
	{
		seenValue += input[ index % input.length ];
		index++;

		if( seen.has( seenValue ) )
		{
			break;
		}

		seen.set( seenValue, true );
	}
	while( true );

	const sum = input.reduce( ( p, c ) => p + c, 0 );
	
	return [ sum, seenValue ];
};

{'fraction_non_alphanumeric': 0.1860215053763441, 'fraction_numerical': 0.010752688172043012, 'mean_word_length': 2.4738805970149254, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5781924', 'n_tokens_mistral': 411, 'n_tokens_neox': 364, 'n_words': 100}