<commit_before>'use strict';

var eXtended = new eXtended();

function eXtended() {
    let eXtended = this;

    /**
     * Private methods
     */
    let _logger = (message) => {
        console.log(message);
    };

    let _forEach = (obj, callback) => {
        Object.keys(obj).forEach(callback);
    };

    let _getProperty = (property) => {
        let properties = {
            className: 'className',
            content: 'innerHTML'
        };

        return properties[property] || '';
    };

    let _newElement = (element) => {
        return document.createElement(element);
    };

    /**
     * Exported methods
     */
    eXtended.create = create;
    eXtended.element = element;
    eXtended.render = render;

    return eXtended;

    /**
     * Public methods
     */
    function create(element, props = {}) {
        let el = _newElement(element);
        let value;
        let property;

        _forEach(props, key => {
            value = props[key] || '';
            property = _getProperty(key);

            el[property] = value;
        });

        return el;
    }

    function element(elementName = false) {
        let type = elementName[0];
        let element;

        elementName = elementName.substring(1);

        if (type === '#') {
            element = document.getElementById(elementName);
        } else if (type === '.') {
            element = document.getElementsByClassName(elementName);
        } else {
            element = document.getElementsByTagName(elementName);
        }

        return element;
    }

    function render(element, target = false) {
        if (!target) {
            _logger('You must specify a target to render an element');

            return;
        }

        let el = eXtended.element(target);

        el.appendChild(element);
    }
};<commit_msg>Renaming object eXtended to eX<commit_after>'use strict';

var eX = new eXtended();

function eXtended() {
    let eX = this;

    /**
     * Private methods
     */
    let _logger = (message) => {
        console.log(message);
    };

    let _forEach = (obj, callback) => {
        Object.keys(obj).forEach(callback);
    };

    let _getProperty = (property) => {
        let properties = {
            className: 'className',
            content: 'innerHTML'
        };

        return properties[property] || '';
    };

    let _newElement = (element) => {
        return document.createElement(element);
    };

    /**
     * Exported methods
     */
    eX.create = create;
    eX.element = element;
    eX.getDefaultAttrs = getDefaultAttrs;
    eX.render = render;

    return eX;

    /**
     * Public methods
     */
    function create(element, props = {}) {
        let el = _newElement(element);
        let value;
        let property;

        _forEach(props, key => {
            value = props[key] || '';
            property = _getProperty(key);

            el[property] = value;
        });

        return el;
    }

    function element(elementName = false) {
        let type = elementName[0];
        let element;

        elementName = elementName.substring(1);

        if (type === '#') {
            element = document.getElementById(elementName);
        } else if (type === '.') {
            element = document.getElementsByClassName(elementName);
        } else {
            element = document.getElementsByTagName(elementName);
        }

        return element;
    }

    function render(element, target = false) {
        if (!target) {
            _logger('You must specify a target to render an element');

            return;
        }

        let el = eX.element(target);

        el.appendChild(element);
    }
};
{'fraction_non_alphanumeric': 0.12449365379422091, 'fraction_numerical': 0.001080205238995409, 'mean_word_length': 1.7870579382994733, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '714711', 'n_tokens_mistral': 1055, 'n_tokens_neox': 1022, 'n_words': 234}