<commit_before>(function($){

    'use strict';

    $.savantForm = function(el, options){

        var base = this;
        
        base.$el = $(el);
        base.el = el;
        
        base.$el.data("savantForm", base);
        
        base.init = function(){
            base.options = $.extend({},$.savantForm.defaultOptions, options);

            $('form.savant-form').submit(function( event ) {
                document.cookie = "savant=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
                document.cookie = "savantchecksandradios=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
            });

            var savant = base.getCookie("savant");
            var savantchecksandradios = base.getCookie("savantchecksandradios");

            if(savant !== "")
                base.restoreFields(savant);

            if(savantchecksandradios !== "")
                base.restoreChecksAndRadios(savantchecksandradios);

            $('.savant-form input, .savant-form textarea').focus(function(){
                base.persistFields();
                base.persistChecksAndRadios();
            });

            $('.savant-form input, .savant-form textarea').focusout(function(){
                base.persistFields();
                base.persistChecksAndRadios();
            });

            $('.savant-form input, .savant-form textarea, .savant-form select').change(function(){
                base.persistFields();
                base.persistChecksAndRadios();
            });

            $('.savant-form input').keyup(function(e){
                base.persistFields();
                base.persistChecksAndRadios();
            });
        };

        base.setCookie = function(name, cvalue) {
            var d = new Date();
            d.setTime(d.getTime() + (base.options.expiresin * 1000));
            var expires = "expires="+d.toUTCString();
            document.cookie = name + "=" + cvalue + "; " + expires;
        };

        base.getCookie = function(name) {
            var name = name + "=";
            var ca = document.cookie.split(';');
            for(var i=0; i<ca.length; i++) {
                var c = ca[i];
                while (c.charAt(0)==' ') c = c.substring(1);
                if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
            }

            return "";<commit_msg>Use '===' to compare with '0'<commit_after>(function($){

    'use strict';

    $.savantForm = function(el, options){

        var base = this;
        
        base.$el = $(el);
        base.el = el;
        
        base.$el.data("savantForm", base);
        
        base.init = function(){
            base.options = $.extend({},$.savantForm.defaultOptions, options);

            $('form.savant-form').submit(function( event ) {
                document.cookie = "savant=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
                document.cookie = "savantchecksandradios=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
            });

            var savant = base.getCookie("savant");
            var savantchecksandradios = base.getCookie("savantchecksandradios");

            if(savant !== "")
                base.restoreFields(savant);

            if(savantchecksandradios !== "")
                base.restoreChecksAndRadios(savantchecksandradios);

            $('.savant-form input, .savant-form textarea').focus(function(){
                base.persistFields();
                base.persistChecksAndRadios();
            });

            $('.savant-form input, .savant-form textarea').focusout(function(){
                base.persistFields();
                base.persistChecksAndRadios();
            });

            $('.savant-form input, .savant-form textarea, .savant-form select').change(function(){
                base.persistFields();
                base.persistChecksAndRadios();
            });

            $('.savant-form input').keyup(function(e){
                base.persistFields();
                base.persistChecksAndRadios();
            });
        };

        base.setCookie = function(name, cvalue) {
            var d = new Date();
            d.setTime(d.getTime() + (base.options.expiresin * 1000));
            var expires = "expires="+d.toUTCString();
            document.cookie = name + "=" + cvalue + "; " + expires;
        };

        base.getCookie = function(name) {
            var name = name + "=";
            var ca = document.cookie.split(';');
            for(var i=0; i<ca.length; i++) {
                var c = ca[i];
                while (c.charAt(0)==' ') c = c.substring(1);
                if (c.indexOf(name) === 0) return c.substring(name.length,c.length);
            }

            return "";
{'fraction_non_alphanumeric': 0.15067035539476484, 'fraction_numerical': 0.013832730368163439, 'mean_word_length': 1.6734926052332195, 'pattern_counts': {'":': 0, '<': 5, '<?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': '561248', 'n_tokens_mistral': 1476, 'n_tokens_neox': 1305, 'n_words': 232}