<commit_before>(function (window, $, ch) {
    'use strict';

    if (ch === undefined) {
        throw new window.Error('Expected ch namespace defined.');
    }

    function normalizeOptions (options) {
        var num = window.parseInt(options, 10);

        if (!window.isNaN(num)) {
            options = {
                'max': num
            };
        }

        return options;
    }

    /**
     * Countdown counts the maximum of characters that user can enter in a form control. Countdown could limit the possibility to continue inserting charset.
     * @memberof ch
     * @constructor
     * @augments ch.Widget
     * @param {(jQuerySelector | ZeptoSelector)} $el A jQuery or Zepto Selector to create an instance of ch.Countdown.
     * @param {Object} [options] Options to customize an instance.
     * @param {Number} [options.max] Number of the maximum amount of characters user can input in form control.
     * @param {String} [options.plural] Message of remaining amount of characters, when it's different to 1. The variable that represents the number to be replaced, should be a hash. By default this parameter is "# characters left.".
     * @param {String} [options.singular] Message of remaining amount of characters, when it's only 1. The variable that represents the number to be replaced, should be a hash. By default this parameter is "# character left.".
     * @returns {countdown} Returns a new instance of ch.Countdown.
     * @example
     * // Create a new Countdown with defaults options.
     * var countdown = $(selector).countdown(500);
     * @example
     * // Create a new Countdown with custom options.
     * var countdown = $(selector).countdown({
     *     'max': 500,
     *     'plural': 'Restan # caracteres.',
     *     'singular': 'Resta # caracter.'
     * });
     */
    function Countdown($el, options) {

        /**
         * Reference to a internal widget instance, saves all the information and configuration properties.
         * @private
         * @type {Object}
         */
        var that = this;

        that.init($el, options);

        /**
         * Emits the event 'ready' when the widget is ready to use.
         * @event ch.Expandable#ready
         * @example
         * // Subscribe to "ready" event.
         * countdown.on('ready', function () {
         *    this.show();
         * });
         */
        window.setTimeout(function () { that.emit("ready"); }, 50);

        return that;

    }<commit_msg>#1046 Update Countdown documentation.<commit_after>(function (window, $, ch) {
    'use strict';

    if (ch === undefined) {
        throw new window.Error('Expected ch namespace defined.');
    }

    function normalizeOptions (options) {
        var num = window.parseInt(options, 10);

        if (!window.isNaN(num)) {
            options = {
                'max': num
            };
        }

        return options;
    }

    /**
     * Countdown counts the maximum of characters that user can enter in a form control. Countdown could limit the possibility to continue inserting charset.
     * @memberof ch
     * @constructor
     * @augments ch.Widget
     * @param {(jQuerySelector | ZeptoSelector)} $el A jQuery or Zepto Selector to create an instance of ch.Countdown.
     * @param {Object} [options] Options to customize an instance.
     * @param {Number} [options.max] Number of the maximum amount of characters user can input in form control.
     * @param {String} [options.plural] Message of remaining amount of characters, when it's different to 1. The variable that represents the number to be replaced, should be a hash. By default this parameter is "# characters left.".
     * @param {String} [options.singular] Message of remaining amount of characters, when it's only 1. The variable that represents the number to be replaced, should be a hash. By default this parameter is "# character left.".
     * @returns {countdown} Returns a new instance of ch.Countdown.
     * @example
     * // Create a new Countdown with defaults options.
     * var countdown = $(selector).countdown(500);
     * @example
     * // Create a new Countdown with custom options.
     * var countdown = $(selector).countdown({
     *     'max': 500,
     *     'plural': 'Restan # caracteres.',
     *     'singular': 'Resta # caracter.'
     * });
     */
    function Countdown($el, options) {

        /**
         * Reference to a internal widget instance, saves all the information and configuration properties.
         * @private
         * @type {Object}
         */
        var that = this;

        that.init($el, options);

        /**
         * Emits the event 'ready' when the widget is ready to use.
         * @event ch.Countdown#ready
         * @example
         * // Subscribe to "ready" event.
         * countdown.on('ready', function () {
         *    this.show();
         * });
         */
        window.setTimeout(function () { that.emit("ready"); }, 50);

        return that;

    }
{'fraction_non_alphanumeric': 0.10860451187861848, 'fraction_numerical': 0.005589938111399481, 'mean_word_length': 2.2553606237816766, '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': '4600403', 'n_tokens_mistral': 1344, 'n_tokens_neox': 1289, 'n_words': 503}