<commit_before>"use strict";

const supportedTranspilers = require("../../../package.json").supportedTranspilers;
const allExtensions        = require("./meta").allExtensions;
const tryRequire           = require("./tryRequire");
const chalk                = require('chalk');
const figures              = require('figures');

function bool2Symbol(pBool) {
    return pBool ? chalk.green(figures.tick) : chalk.red(figures.cross);
}

function formatTranspilers(pTranspilers) {
    return Object.keys(pTranspilers).reduce(
        (pAll, pThis) => `${pAll}    ${bool2Symbol(tryRequire(pThis))} ${pThis} (${pTranspilers[pThis]})\n`,
        `    ${bool2Symbol(true)} javascript (>es1)\n`
    );
}

function formatExtensions(pExtensions) {
    return pExtensions.reduce(
        (pAll, pThis) => `${pAll}    ${bool2Symbol(pThis.available)} ${pThis.extension}\n`,
        ""
    );
}

module.exports = () => `
  Supported:

    If you need a currently-not-enabled transpiler (those with a '${chalk.red(figures.cross)}'), just
    install it. E.g. 'npm install --save-dev livescript' will enable livescript<commit_msg>:bug: takes the version of the transpiler into account when displaying transpiler meta info<commit_after>"use strict";

const supportedTranspilers = require("../../../package.json").supportedTranspilers;
const allExtensions        = require("./meta").allExtensions;
const tryRequire           = require("./tryRequire");
const chalk                = require('chalk');
const figures              = require('figures');

function bool2Symbol(pBool) {
    return pBool ? chalk.green(figures.tick) : chalk.red(figures.cross);
}

function formatTranspilers(pTranspilers) {
    return Object.keys(pTranspilers).reduce(
        (pAll, pThis) =>
            `${pAll}    ${bool2Symbol(tryRequire(pThis, pTranspilers[pThis]))} ${pThis} (${pTranspilers[pThis]})\n`,
        `    ${bool2Symbol(true)} javascript (>es1)\n`
    );
}

function formatExtensions(pExtensions) {
    return pExtensions.reduce(
        (pAll, pThis) => `${pAll}    ${bool2Symbol(pThis.available)} ${pThis.extension}\n`,
        ""
    );
}

module.exports = () => `
  Supported:

    If you need a currently-not-enabled transpiler (those with a '${chalk.red(figures.cross)}'), just
    install it. E.g. 'npm install --save-dev livescript' will enable livescript
{'fraction_non_alphanumeric': 0.15631691648822268, 'fraction_numerical': 0.004282655246252677, 'mean_word_length': 3.4158790170132325, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2260858', 'n_tokens_mistral': 728, 'n_tokens_neox': 700, 'n_words': 149}