<commit_before>/*===========================
jQuery-like DOM library
===========================*/
var Dom7 = function (arr) {
    var _this = this, i = 0;
    // Create array-like object
    for (i = 0; i < arr.length; i++) {
        _this[i] = arr[i];
    }
    _this.length = arr.length;
    // Return collection with methods
    return this;
};
Dom7.prototype = {
    // Classes and attriutes
    addClass: function (className) {
        var classes = className.split(' ');
        for (var i = 0; i < classes.length; i++) {
            for (var j = 0; j < this.length; j++) {
                this[j].classList.add(classes[i]);
            }
        }
        return this;
    },
    removeClass: function (className) {
        var classes = className.split(' ');
        for (var i = 0; i < classes.length; i++) {
            for (var j = 0; j < this.length; j++) {
                this[j].classList.remove(classes[i]);
            }
        }
        return this;
    },
    hasClass: function (className) {
        if (!this[0]) return false;
        else return this[0].classList.contains(className);
    },
    toggleClass: function (className) {
        var classes = className.split(' ');
        for (var i = 0; i < classes.length; i++) {
            for (var j = 0; j < this.length; j++) {
                this[j].classList.toggle(classes[i]);
            }
        }
        return this;
    },
    attr: function (attr, value) {
        if (typeof value === 'undefined') {
            if (this[0]) return this[0].getAttribute(attr);
            else return undefined;
        }
        else {
            for (var i = 0; i < this.length; i++) {
                this[i].setAttribute(attr, value);
            }
            return this;
        }
    },
    prop: function (prop, value) {
        if (typeof value === 'undefined') {
            if (this[0]) return this[0][prop];
            else return undefined;
        }
        else {
            for (var i = 0; i < this.length; i++) {
                this[i][prop] = value;
            }
            return this;
        }
    },
    data: function (key, value) {
        if (typeof value === 'undefined') {
            // Get value
            if (this[0]) {
                var dataKey = this[0].getAttribute('data-' + key);
                if (dataKey) return dataKey;
                else if (this[0].f7ElementDataStorage && this[0].f7ElementDataStorage[key]) return this[0].f7ElementDataStorage[key];
                else return undefined;
            }
            else return undefined;
        }
        else {
            // Set value
            for (var i = 0; i < this.length; i++) {
                var el = this[i];
                if (!el.f7ElementDataStorage) el.f7ElementDataStorage = {};
                el.f7ElementDataStorage[key] = value;
            }
            return this;
        }
    },
    val: function (value) {
        if (typeof value === 'undefined') {
            if (this[0]) return this[0].value;
            else return null;
        }
        else {
            for (var i = 0; i < this.length; i++) {
                this[i].value = value;
            }
            return this;
        }
    },
    // Transforms
    transform : function (transform) {
        for (var i = 0; i < this.length; i++) {<commit_msg>f7ElementDataStorage -> dom7ElementDataStorage<commit_after>/*===========================
jQuery-like DOM library
===========================*/
var Dom7 = function (arr) {
    var _this = this, i = 0;
    // Create array-like object
    for (i = 0; i < arr.length; i++) {
        _this[i] = arr[i];
    }
    _this.length = arr.length;
    // Return collection with methods
    return this;
};
Dom7.prototype = {
    // Classes and attriutes
    addClass: function (className) {
        var classes = className.split(' ');
        for (var i = 0; i < classes.length; i++) {
            for (var j = 0; j < this.length; j++) {
                this[j].classList.add(classes[i]);
            }
        }
        return this;
    },
    removeClass: function (className) {
        var classes = className.split(' ');
        for (var i = 0; i < classes.length; i++) {
            for (var j = 0; j < this.length; j++) {
                this[j].classList.remove(classes[i]);
            }
        }
        return this;
    },
    hasClass: function (className) {
        if (!this[0]) return false;
        else return this[0].classList.contains(className);
    },
    toggleClass: function (className) {
        var classes = className.split(' ');
        for (var i = 0; i < classes.length; i++) {
            for (var j = 0; j < this.length; j++) {
                this[j].classList.toggle(classes[i]);
            }
        }
        return this;
    },
    attr: function (attr, value) {
        if (typeof value === 'undefined') {
            if (this[0]) return this[0].getAttribute(attr);
            else return undefined;
        }
        else {
            for (var i = 0; i < this.length; i++) {
                this[i].setAttribute(attr, value);
            }
            return this;
        }
    },
    prop: function (prop, value) {
        if (typeof value === 'undefined') {
            if (this[0]) return this[0][prop];
            else return undefined;
        }
        else {
            for (var i = 0; i < this.length; i++) {
                this[i][prop] = value;
            }
            return this;
        }
    },
    data: function (key, value) {
        if (typeof value === 'undefined') {
            // Get value
            if (this[0]) {
                var dataKey = this[0].getAttribute('data-' + key);
                if (dataKey) return dataKey;
                else if (this[0].dom7ElementDataStorage && this[0].dom7ElementDataStorage[key]) return this[0].dom7ElementDataStorage[key];
                else return undefined;
            }
            else return undefined;
        }
        else {
            // Set value
            for (var i = 0; i < this.length; i++) {
                var el = this[i];
                if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {};
                el.dom7ElementDataStorage[key] = value;
            }
            return this;
        }
    },
    val: function (value) {
        if (typeof value === 'undefined') {
            if (this[0]) return this[0].value;
            else return null;
        }
        else {
            for (var i = 0; i < this.length; i++) {
                this[i].value = value;
            }
            return this;
        }
    },
    // Transforms
    transform : function (transform) {
        for (var i = 0; i < this.length; i++) {
{'fraction_non_alphanumeric': 0.15065012703631744, 'fraction_numerical': 0.010461814377522045, 'mean_word_length': 1.4840386043058649, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 4, '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': '6762525', 'n_tokens_mistral': 1941, 'n_tokens_neox': 1888, 'n_words': 517}