<commit_before>var fs = require('fs');

var tmpFolder = 'tmp';
var outFolder = 'out';

(function ()
{
	makeDir(outFolder);

	var textLogo = fs.readFileSync('logo.txt').toString();

	copyFile('tswlib.d.ts', textLogo, removeRefComments);
	copyFile('tswlib.js', textLogo);

})();

function copyFile(fileName, textLogo, processLine)
{
	var text = fs.readFileSync(pathCombine(tmpFolder, fileName)).toString();

	if (processLine)
	{
		text = processLine(text);
	}

	var data2 = textLogo + text;
	fs.writeFileSync(pathCombine(outFolder, fileName), data2);
}

function removeRefComments(text)
{
	return text
		.split("\n")
		.filter(function (line)
			{
				return line.substr(0, 3) !== '///';
			})
		.map(function (line)
		{
			line = line.replace(/public\s+z_/, 'private z_');
			return line;
		})
		.join('\n');
}

function makeDir(folderName)
{
	if (!fs.existsSync(folderName)) fs.mkdirSync(folderName);
}

function pathCombine(s1, s2)
{
	if (s1.slice(-1) != '\\' && s2[0] != '\\') s1 += '\\';

	return s1 + s2;
}

<commit_msg>fix: make private z_ for tsc v1.1.01<commit_after>var fs = require('fs');

var tmpFolder = 'tmp';
var outFolder = 'out';

(function ()
{
	makeDir(outFolder);

	var textLogo = fs.readFileSync('logo.txt').toString();

	copyFile('tswlib.d.ts', textLogo, removeRefComments);
	copyFile('tswlib.js', textLogo);

})();

function copyFile(fileName, textLogo, processLine)
{
	var text = fs.readFileSync(pathCombine(tmpFolder, fileName)).toString();

	if (processLine)
	{
		text = processLine(text);
	}

	var data2 = textLogo + text;
	fs.writeFileSync(pathCombine(outFolder, fileName), data2);
}

function removeRefComments(text)
{
	return text
		.split("\n")
		.filter(function (line)
			{
				return line.substr(0, 3) !== '///';
			})
		.map(function (line)
		{
			line = line
				.replace(/public\s+z_/, 'private z_')
				.replace(/^(\s*)z_/, '$1private z_');
			return line;
		})
		.join('\n');
}

function makeDir(folderName)
{
	if (!fs.existsSync(folderName)) fs.mkdirSync(folderName);
}

function pathCombine(s1, s2)
{
	if (s1.slice(-1) != '\\' && s2[0] != '\\') s1 += '\\';

	return s1 + s2;
}


{'fraction_non_alphanumeric': 0.19603212092583844, 'fraction_numerical': 0.014643363249881908, 'mean_word_length': 4.0308788598574825, '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': '555575', 'n_tokens_mistral': 884, 'n_tokens_neox': 829, 'n_words': 154}