<commit_before>'use strict';
var DirectivesModule = angular.module('KMC.directives', [
    'colorpicker.module',
    'ui.bootstrap',
    'ui.select2',
    'ui.sortable'
]);
DirectivesModule.directive('timeago', [function() {
    return {
        restrict: 'CA',
        link: function(scope, iElement, iAttrs) {
            if (typeof $.timeago == 'function') {
                scope.$observe('timeago', function(newVal) {
                    if (newVal && !isNaN(newVal)) {
                        var date = scope.timestamp * 1000;
                        iElement.text($.timeago(date));
                    }
                });
            }
        }
    };
}]);
DirectivesModule.directive('hiddenValue', [function() {
    return {
        template: '<input type="hidden" value="{{model}}"/>',
        scope: {
            model: '='
        },
        restrict: 'EA'
    };
}]);<commit_msg>add initvalue to hidden directive<commit_after>'use strict';
var DirectivesModule = angular.module('KMC.directives', [
    'colorpicker.module',
    'ui.bootstrap',
    'ui.select2',
    'ui.sortable'
]);
DirectivesModule.directive('timeago', [function() {
    return {
        restrict: 'CA',
        link: function(scope, iElement, iAttrs) {
            if (typeof $.timeago == 'function') {
                scope.$observe('timeago', function(newVal) {
                    if (newVal && !isNaN(newVal)) {
                        var date = scope.timestamp * 1000;
                        iElement.text($.timeago(date));
                    }
                });
            }
        }
    };
}]);
DirectivesModule.directive('hiddenValue', [function() {
    return {
        template: '<input type="hidden" value="{{model}}"/>',
        scope: {
            model: '='
        },
        controller:function($scope,$element,$attrs){
            if ($attrs['initvalue']){
                $scope.model = $attrs['initvalue'];
            }
        },
        restrict: 'EA'
    };
}]);
{'fraction_non_alphanumeric': 0.1621212121212121, 'fraction_numerical': 0.005050505050505051, 'mean_word_length': 1.7437673130193905, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6773244', 'n_tokens_mistral': 571, 'n_tokens_neox': 552, 'n_words': 95}