<commit_before>'use strict';

angular.module('app')
    .filter('addSpaces', function () {
        return function (text) {
            if (text !== undefined) {
                return text.replace(/[_]/g, ' ');
            }
        };
    })
    .filter('orderObjectBy', function() {
        return function(items, field, reverse) {
            var filtered = [];
            console.log(field);
            angular.forEach(items, function(item) {
                filtered.push(item);

            });
            filtered.sort(function (a, b) {
                return (a[field] > b[field] ? 1 : -1);
            });

            if(reverse) {
                filtered.reverse();
            }

            return filtered;
        };
    })
    .filter('role', function () {<commit_msg>SAVEPOINT<commit_after>'use strict';

angular.module('app')
    .filter('addSpaces', function () {
        return function (text) {
            if (text !== undefined) {
                return text.replace(/[_]/g, ' ');
            }
        };
    })
    .filter('orderObjectBy', function() {
        return function(items, field, reverse) {
            var filtered = [];
            angular.forEach(items, function(item) {
                filtered.push(item);

            });
            filtered.sort(function (a, b) {
                return (a[field] > b[field] ? 1 : -1);
            });

            if(reverse) {
                filtered.reverse();
            }

            return filtered;
        };
    })
    .filter('role', function () {
{'fraction_non_alphanumeric': 0.1517509727626459, 'fraction_numerical': 0.0025940337224383916, 'mean_word_length': 1.3848531684698608, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '222367', 'n_tokens_mistral': 421, 'n_tokens_neox': 404, 'n_words': 77}