<commit_before>import * as style        from "./styles/style.js";
import * as zoomBehavior from "./behaviors/zoomBehavior.js";

/**
 * The default configuration of this visualizer.
 *
 * @type {Object}
 */
export const defaultConf = {
    style: {
        function: style.makeViewWithDefaultConf,
        params: []
    },
    behaviors: [{
        function: zoomBehavior.addBehavior,
        params: []
    }]
};

export function makeEnhancedView(conf)  {
    const result = conf.style.function(...conf.style.params);

    for (let behavior of conf.behaviors) {
        behavior.function(...behavior.params, result);
    }
}

export function makeEnhancedViewWithDefaultConf() {<commit_msg>More comments<commit_after>import * as style        from "./styles/style.js";
import * as zoomBehavior from "./behaviors/zoomBehavior.js";

/**
 * The default configuration of this visualizer.
 *
 * @type {Object}
 */
export const defaultConf = {

    /**
     * The style to use to create the stage and renderer.
     *
     * @type {Object}
     */
    style: {

        /**
         * The function to call to make the stage and renderer.
         *
         * @type {Function}
         */
        function: style.makeViewWithDefaultConf,

        /**
         * The parameters to pass to that function.
         *
         * @type {Array}
         */
        params: []
    },

    /**
     * The behaviors to add to the stage.
     *
     * @type {Array<Object>}
     */
    behaviors: [{

        /**
         * The function to call to add the behavior.
         *
         * @
         */
        function: zoomBehavior.addBehavior,
        params: []
    }]
};

export function makeEnhancedView(conf)  {
    const result = conf.style.function(...conf.style.params);

    for (let behavior of conf.behaviors) {
        behavior.function(...behavior.params, result.stage, result.renderer);
    }
}

export function makeEnhancedViewWithDefaultConf() {
{'fraction_non_alphanumeric': 0.12287917737789203, 'fraction_numerical': 0.0, 'mean_word_length': 2.074249605055292, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '7284995', 'n_tokens_mistral': 561, 'n_tokens_neox': 554, 'n_words': 142}