<commit_before>'use strict';

/* 
 * Rachels Directives
 * 
 * A parent module for my custom directives.
 */

angular.module('rcDirectives', [
    'rc.alertBar',
    'rc.placeholdBrokenImg',
    'rc.stateRedirectTimeout',
    'rcMessages'
])
.constant('DIRECTIVES_URL', (function () {
    var scripts = document.getElementsByTagName("script");
    var scriptPath = scripts[scripts.length - 1].src;
    return scriptPath.substring(0, scriptPath.lastIndexOf('/') + 1);
})());<commit_msg>Added string-to-number directive to be used on input[number]<commit_after>'use strict';

/* 
 * Rachels Directives
 * 
 * A parent module for my custom directives.
 */

angular.module('rcDirectives', [
    'rc.alertBar',
    'rc.placeholdBrokenImg',
    'rc.stateRedirectTimeout',
    'rcMessages'
])
.constant('DIRECTIVES_URL', (function () {
    var scripts = document.getElementsByTagName("script");
    var scriptPath = scripts[scripts.length - 1].src;
    return scriptPath.substring(0, scriptPath.lastIndexOf('/') + 1);
})())
.directive('stringToNumber', function () {
    return {
        require: 'ngModel',
        link: function (scope, element, attrs, ngModel) {
            ngModel.$parsers.push(function (value) {
                return '' + value;
            });
            ngModel.$formatters.push(function (value) {
                return parseFloat(value, 10);
            });
        }
    };
});
{'fraction_non_alphanumeric': 0.15060670949321914, 'fraction_numerical': 0.005710206995003569, 'mean_word_length': 3.052023121387283, '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': '2958125', 'n_tokens_mistral': 432, 'n_tokens_neox': 417, 'n_words': 85}