<commit_before>/* istanbul ignore next */
/*eslint no-console: 0*/
const noop = () => {};

function loggerPlugin() {
    const supportsGroups = console.group && console.groupEnd;
    const startGroup = supportsGroups
        ? () => console.group('Router transition')
        : noop;
    const endGroup = supportsGroups
        ? () => console.groupEnd('Router transition')
        : noop;

    console.info('Router started');

    return {
        onStop() {
            console.info('Router stopped');
        },
        onTransitionStart(toState, fromState) {
            endGroup();
            startGroup();
            console.log('Transition started from state');
            console.log(fromState);
            console.log('To state');
            console.log(toState);
        },
        onTransitionCancel() {
            console.warn('Transition cancelled');<commit_msg>Use console.groupCollapsed() in the logger plugin, where available.<commit_after>/* istanbul ignore next */
/*eslint no-console: 0*/
const noop = () => {};

function loggerPlugin() {
    let startGroup, endGroup;

    if (console.groupCollapsed) {
        startGroup = label => console.groupCollapsed(label);
        endGroup = () => console.groupEnd();
    } else if (console.group) {
        startGroup = label => console.group(label);
        endGroup = () => console.groupEnd();
    } else {
        startGroup = noop;
        endGroup = noop;
    }

    console.info('Router started');

    return {
        onStop() {
            console.info('Router stopped');
        },
        onTransitionStart(toState, fromState) {
            endGroup();
            startGroup('Router transition');
            console.log('Transition started from state');
            console.log(fromState);
            console.log('To state');
            console.log(toState);
        },
        onTransitionCancel() {
            console.warn('Transition cancelled');
{'fraction_non_alphanumeric': 0.13191929643041903, 'fraction_numerical': 0.0010346611484738748, 'mean_word_length': 2.186161449752883, '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': '364198', 'n_tokens_mistral': 501, 'n_tokens_neox': 493, 'n_words': 110}