<commit_before>class Utils

    getHTMLTitleFromHistoryFragment: (fragment) ->
        _.capitalize(fragment.split('\/').join(' '))

    stringJSON: (object) ->
        JSON.stringify object, null, '    '

    viewJSON: (object) ->
        objectClone = _.extend {}, object
        delete objectClone.JSONString
        vex.dialog.alert
            contentCSS:
                width: 800
            message: "<pre>#{ utils.stringJSON objectClone }</pre>"

    getAcrossCollections: (collectionStrings, id) ->
        model = undefined
        _.each collectionStrings, (collectionString) ->
            collection = app.collections[collectionString]
            model = collection.get(id) ? model
        return model

module.exports = new Utils<commit_msg>Add sorttable quick utility<commit_after>class Utils

    getHTMLTitleFromHistoryFragment: (fragment) ->
        _.capitalize(fragment.split('\/').join(' '))

    stringJSON: (object) ->
        JSON.stringify object, null, '    '

    viewJSON: (object) ->
        objectClone = _.extend {}, object
        delete objectClone.JSONString
        vex.dialog.alert
            contentCSS:
                width: 800
            message: "<pre>#{ utils.stringJSON objectClone }</pre>"

    getAcrossCollections: (collectionStrings, id) ->
        model = undefined
        _.each collectionStrings, (collectionString) ->
            collection = app.collections[collectionString]
            model = collection.get(id) ? model
        return model

    setupSortableTables: ->
        $('table.sortTable').each -> sorttable.makeSortable @

module.exports = new Utils
{'fraction_non_alphanumeric': 0.11227637260950031, 'fraction_numerical': 0.003701418877236274, 'mean_word_length': 2.3102040816326532, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, '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': '7634147', 'n_tokens_mistral': 432, 'n_tokens_neox': 420, 'n_words': 93}