<commit_before>/**
 * @module events
 * @version 1.0.4
 * @author <NAME> <<EMAIL>>
 */

modules.define('events', ['identify', 'inherit'], function(provide, identify, inherit) {

var undef,
    storageExpando = '__' + (+new Date) + 'storage',
    getFnId = function(fn, ctx) {
        return identify(fn) + (ctx? identify(ctx) : '');
    },

    /**
     * @class Event
     * @alias events :Event
     */
    Event = inherit(/** @lends Event.prototype */{
        __constructor : function(type, target) {
            this.type = type;
            this.target = target;
            this.result = undef;
            this.data = undef;

            this._isDefaultPrevented = false;
            this._isPropagationStopped = false;
        },

        preventDefault : function() {
            this._isDefaultPrevented = true;
        },

        isDefaultPrevented : function() {
            return this._isDefaultPrevented;
        },

        stopPropagation : function() {
            this._isPropagationStopped = true;
        },

        isPropagationStopped : function() {
            return this._isPropagationStopped;
        }
    }),

    EmitterProps = {
        /**
         * Adding event handler
         * @param {String} e Event type
         * @param {Object} [data] Additional data that the handler gets as e.data
         * @param {Function} fn Handler
         * @param {Object} [ctx] Handler context
         * @returns {this}
         */
        on : function(e, data, fn, ctx, _special) {
            if(typeof e === 'string') {
                if(typeof data === 'function') {
                    ctx = fn;
                    fn = data;
                    data = undef;
                }
<commit_msg>events: use functions module<commit_after>/**
 * @module events
 * @version 1.0.4
 * @author <NAME> <<EMAIL>>
 */

modules.define(
    'events',
    ['identify', 'inherit', 'functions'],
    function(provide, identify, inherit, functions) {

var undef,
    storageExpando = '__' + (+new Date) + 'storage',
    getFnId = function(fn, ctx) {
        return identify(fn) + (ctx? identify(ctx) : '');
    },

    /**
     * @class Event
     * @alias events :Event
     */
    Event = inherit(/** @lends Event.prototype */{
        __constructor : function(type, target) {
            this.type = type;
            this.target = target;
            this.result = undef;
            this.data = undef;

            this._isDefaultPrevented = false;
            this._isPropagationStopped = false;
        },

        preventDefault : function() {
            this._isDefaultPrevented = true;
        },

        isDefaultPrevented : function() {
            return this._isDefaultPrevented;
        },

        stopPropagation : function() {
            this._isPropagationStopped = true;
        },

        isPropagationStopped : function() {
            return this._isPropagationStopped;
        }
    }),

    EmitterProps = {
        /**
         * Adding event handler
         * @param {String} e Event type
         * @param {Object} [data] Additional data that the handler gets as e.data
         * @param {Function} fn Handler
         * @param {Object} [ctx] Handler context
         * @returns {this}
         */
        on : function(e, data, fn, ctx, _special) {
            if(typeof e === 'string') {
                if(functions.isFunction(data)) {
                    ctx = fn;
                    fn = data;
                    data = undef;
                }

{'fraction_non_alphanumeric': 0.12435677530017153, 'fraction_numerical': 0.0017152658662092624, 'mean_word_length': 1.6527672479150872, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2350271', 'n_tokens_mistral': 996, 'n_tokens_neox': 961, 'n_words': 236}