<commit_before>( function ( ctx ) {
    "use strict";

    var params = {
        endWithComma: false
    };

    var router = ctx.router = {
        on404: function ( rt, e ) {
            throw new Error( [
                'Path' + router.resolvePath.apply( router, rt ) + ' not found.',
                'You can handle the error by overriding this function.'
            ].join( '\n' ) );
        },
        route: ctx.ko.observableArray(),
        root: Page( {
            title: ctx.document.title
        } ),
        resolvePath: function resolvePath() {
            var args = Array.from( arguments );
            var url = args.map( function ( r ) {
                if ( r.slice( -1 ) !== '/' ) r += '/';
                return r;
            } ).reduce( function ( url, path ) {
                return new ctx.URL( path, url.href );
            }, new ctx.URL( ctx.location.origin ) );
            return ( params.endWithComma ? url.pathname : url.pathname.slice( 0, -1 ) ) + url.search + url.hash;
        },
        navigate: function navigate( href ) {
            href = router.resolvePath( href );
            return guards( path( href ) ).then( function () {
                ctx.history.pushState( {}, '', href );
                router.route( path() );
            } );
        },
        start: function start( opts ) {
            params = Object.assign( params, opts );
            return ( ctx.onpopstate = handlePop )();<commit_msg>fix #4<commit_after>( function ( ctx ) {
    "use strict";

    var router = ctx.router = {
        on404: function ( rt, e ) {
            throw new Error( [
                'Path' + router.resolvePath.apply( router, rt ) + ' not found.',
                'You can handle the error by overriding this function.'
            ].join( '\n' ) );
        },
        route: ctx.ko.observableArray(),
        root: Page( {
            title: ctx.document.title
        } ),
        resolvePath: function resolvePath() {
            var args = Array.from( arguments );
            var url = args.map( function ( r, i, s ) {
                if ( r.slice( -1 ) !== '/' && i !== s.length - 1 ) r += '/';
                return r;
            } ).reduce( function ( url, path ) {
                return new ctx.URL( path, url.href );
            }, new ctx.URL( ctx.location.origin ) );
            return url.pathname + url.search + url.hash;
        },
        navigate: function navigate( href ) {
            href = router.resolvePath( href );
            return guards( path( href ) ).then( function () {
                ctx.history.pushState( {}, '', href );
                router.route( path() );
            } );
        },
        start: function start( opts ) {
            return ( ctx.onpopstate = handlePop )();
{'fraction_non_alphanumeric': 0.14089595375722544, 'fraction_numerical': 0.004335260115606936, 'mean_word_length': 1.4289473684210525, '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': '2166083', 'n_tokens_mistral': 767, 'n_tokens_neox': 741, 'n_words': 210}