<commit_before>define ['backbone.marionette'], (Marionette) ->
    class Router extends Marionette.AppRouter
        routes:
            'unit/:id': 'renderUnit',
            'unit/?*params': 'renderUnitsWithFilter'

        renderUnit: (id)->
            app.vent.trigger 'unit:render-one', id

        renderUnitsWithFilter: (params) ->
            app.vent.trigger 'units:render-with-filter', params

    Router<commit_msg>Fix issue caused by asynchronous routing delaying a callback function<commit_after>define ['backbone.marionette'], (Marionette) ->
    delayTime = 500
    class Router extends Marionette.AppRouter
        routes:
            'unit/:id': 'renderUnit',
            'unit/?*params': 'renderUnitsWithFilter'

        renderUnit: (id)->
            delayed = -> app.vent.trigger 'unit:render-one', id
            _.delay delayed, delayTime

        renderUnitsWithFilter: (params) ->
            delayed = -> app.vent.trigger 'units:render-with-filter', params
            _.delay delayed, delayTime

    Router
{'fraction_non_alphanumeric': 0.11918604651162791, 'fraction_numerical': 0.0029069767441860465, 'mean_word_length': 2.4548494983277593, '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': '5171238', 'n_tokens_mistral': 291, 'n_tokens_neox': 281, 'n_words': 64}