<commit_before>'use strict';

const Fsep = require('fsep');
const Path = require('path');
const Utility = require('../utility');

module.exports = async function Transform (input, output, options) {
	input = await Utility.parsePath(input);
	output = await Utility.parsePath(output);

	if (options.bundle) {
		input.extensions.push('b');
	}

	if (options.minify) {
		input.extensions.push('m');
	}

	if (options.transpile && (input.extensionMain === 'js' || input.extensionMain === 'css')) {
		input.extensions.push('t');
	}

	var outputPath = await Utility.cleanExtensions(output.absolute);
	var extensions = await Utility.sortExtensions(input.extensions);

	if (extensions.length > 0) {
		extensions.pop();
		extensions.splice(0, 0, input.extensionMain);
	}

	let text = await Fsep.readFile(input.absolute, 'binary');

	if (input.isValidExtension) {
		var transformPathBase = __dirname;
		var transformPathFull = '';

		for (var i = 0, l = extensions.length; i < l; i++) {
			let extension = extensions[i];<commit_msg>fixed duplicate transforms<commit_after>'use strict';

const Fsep = require('fsep');
const Path = require('path');
const Utility = require('../utility');

module.exports = async function Transform (input, output, options) {
	input = await Utility.parsePath(input);
	output = await Utility.parsePath(output);

	if (options.bundle && !input.extensions.includes('b')) {
		input.extensions.push('b');
	}

	if (options.minify && !input.extensions.includes('m')) {
		input.extensions.push('m');
	}

	if (options.transpile && !input.extensions.includes('t') && (input.extensionMain === 'js' || input.extensionMain === 'css')) {
		input.extensions.push('t');
	}

	var outputPath = await Utility.cleanExtensions(output.absolute);
	var extensions = await Utility.sortExtensions(input.extensions);

	if (extensions.length > 0) {
		extensions.pop();
		extensions.splice(0, 0, input.extensionMain);
	}

	let text = await Fsep.readFile(input.absolute, 'binary');

	if (input.isValidExtension) {
		var transformPathBase = __dirname;
		var transformPathFull = '';

		for (var i = 0, l = extensions.length; i < l; i++) {
			let extension = extensions[i];
{'fraction_non_alphanumeric': 0.16280148423005567, 'fraction_numerical': 0.0037105751391465678, 'mean_word_length': 4.7828418230563, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5179733', 'n_tokens_mistral': 712, 'n_tokens_neox': 656, 'n_words': 156}