<commit_before>/*!
 * @author:    Divio AG
 * @copyright: http://www.divio.ch
 */

//######################################################################################################################
// #NAMESPACES#
/**
 * @module Cl
 */
var Cl = window.Cl || {};

//######################################################################################################################
// #UTILS#
(function ($) {
    'use strict';

    /**
     * Contains various helpers, feel free to extend and adapt
     *
     * @class Utils
     * @namespace Cl
     */
    Cl.Utils = {
        /**
         * Document setup for no javascript fallbacks and logging
         *
         * @method _document
         * @private
         */
        _document: function () {
            // remove no-js class if javascript is activated
            $(document.body).removeClass('noscript');
            // ensure that console methods don't throw errors
            this._consoleWrapper();
        },

        /**
         * Stubs all the methods from console api that are not available in current environment
         * DOCS: https://developer.chrome.com/devtools/docs/console-api
         *
         * @method _consoleWrapper
         * @private
         */
        _consoleWrapper: function () {
            var method;
            var noop = function () {};
            var methods = [
                'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
                'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
                'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
                'timeStamp', 'trace', 'warn'
            ];
            var length = methods.length;
            var console = (window.console = window.console || {});

            while (length--) {
                method = methods[length];

                // Only stub undefined methods.
                if (!console[method]) {
                    console[method] = noop;
                }
            }
        },

        /**
         * Simple redirection
         *
         * @method redirectTo
         * @param url {String} URL string
         */
        redirectTo: function (url) {
            window.location.href = url;
        },

        /**
         * Save information within local storage
         *
         * @method setStorage
         * @param token {String} namespace
         * @param value {String} storage value
         */
        setStorage: function (token, value) {
            if (window.localStorage) {
                localStorage.setItem(token, value);
            }
        },

        /**
         * Retrieve information from local storage
         *
         * @method getStorage
         * @param token {String} namespace
         */
        getStorage: function (token) {
            if (window.localStorage) {
                return localStorage.getItem(token);
            }
        }
    };

})(jQuery);
<commit_msg>use correct setters<commit_after>/*!
 * @author:    Divio AG
 * @copyright: http://www.divio.ch
 */

//######################################################################################################################
// #NAMESPACES#
/**
 * @module Cl
 */
var Cl = window.Cl || {};

//######################################################################################################################
// #UTILS#
(function ($) {
    'use strict';

    /**
     * Contains various helpers, feel free to extend and adapt
     *
     * @class Utils
     * @namespace Cl
     */
    Cl.Utils = {
        /**
         * Document setup for no javascript fallbacks and logging
         *
         * @method _document
         * @private
         */
        _document: function () {
            // remove no-js class if javascript is activated
            $(document.body).removeClass('noscript');
            // ensure that console methods don't throw errors
            this._consoleWrapper();
        },

        /**
         * Stubs all the methods from console api that are not available in current environment
         * DOCS: https://developer.chrome.com/devtools/docs/console-api
         *
         * @method _consoleWrapper
         * @private
         */
        _consoleWrapper: function () {
            var method;
            var noop = function () {};
            var methods = [
                'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
                'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
                'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
                'timeStamp', 'trace', 'warn'
            ];
            var length = methods.length;
            var console = (window.console = window.console || {});

            while (length--) {
                method = methods[length];

                // Only stub undefined methods.
                if (!console[method]) {
                    console[method] = noop;
                }
            }
        },

        /**
         * Simple redirection
         *
         * @method redirectTo
         * @param url {String} URL string
         */
        redirectTo: function (url) {
            window.location.href = url;
        },

        /**
         * Save information within local storage
         *
         * @method setStorage
         * @param token {String} namespace
         * @param value {String} storage value
         */
        setStorage: function (token, value) {
            if (typeof(Storage) !== void(0)) {
                localStorage.setItem(token, value);
            }
        },

        /**
         * Retrieve information from local storage
         *
         * @method getStorage
         * @param token {String} namespace
         */
        getStorage: function (token) {
            if (typeof(Storage) !== void(0)) {
                return localStorage.getItem(token);
            }
        }
    };

})(jQuery);

{'fraction_non_alphanumeric': 0.19391507856904044, 'fraction_numerical': 0.00033433634236041456, 'mean_word_length': 1.6092455298735282, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '5690845', 'n_tokens_mistral': 1478, 'n_tokens_neox': 1415, 'n_words': 374}