<commit_before>// require ./iterator

var
    Extensor = {},
    Iterator;

(function ($) {
    "use strict";

    Object.defineProperties($, {

        new: {

            value: function (object, writable, structure) {
                var
                    ConstructorReference = Extensor.new,

                    verbose = false,
                    enumerable,
                    context,

                    resolveModule = function () {
                        var
                            context = object,
                            arg = arguments[0];

                        arg.forEach(function (v) {
                            if (!context[v]) {
                                context[v] = {};
                            }
                            context = context[v];
                        });

                        return context;
                    };

                if (this instanceof ConstructorReference) {
                    throw new Error("Illegal constructor");
                }

                if (!structure && (typeof writable == "object" ||
                    typeof writable === "function")) {
                    structure = writable;
                }

                if (typeof writable !== "boolean") {
                    writable = true;
                }

                Iterator.selectEach(structure, true, function (body, name,
                                                               trace) {
                    if (trace.length) {
                        context = resolveModule(trace);
                    } else if (!context) {
                        context = object;
                    }

                    if (typeof body === "function") {
                        enumerable = false;
                    }

                    // Object.getOwnPropertyDescriptor(context, name).configurable
                    try {
                        Object.defineProperty(context, name, {
                            value: body,
                            writable: writable,
                            configurable: writable,
                            enumerable: enumerable
                        });
                    } catch (e) {
                        if (verbose) {
                            console.warn("Property \"" + name +
                                "\" of class \"" + context.name +
                                "\" can't be redefined because " +
                                "it's configured as read-only.");
                        }
                    }

                });

            }

        }

    });

})(Extensor);
<commit_msg>fix extensor<commit_after>// require ./iterator

var
    Extensor = {},
    Iterator;

(function ($) {
    "use strict";

    Object.defineProperties($, {

        new: {

            value: function (object, writable, structure) {
                var
                    ConstructorReference = Extensor.new,

                    verbose = false,
                    enumerable,
                    context,

                    resolveModule = function () {
                        var
                            context = object,
                            arg = arguments[0];

                        arg.forEach(function (v) {
                            if (!context[v]) {
                                context[v] = {};
                            }
                            context = context[v];
                        });

                        return context;
                    };

                if (this instanceof ConstructorReference) {
                    throw new Error("Illegal constructor");
                }

                if (!structure && (typeof writable == "object" ||
                    typeof writable === "function")) {
                    structure = writable;
                }

                if (typeof writable !== "boolean") {
                    writable = false;
                }

                Iterator.selectEach(structure, true, function (body, name,
                                                               trace) {

                    if (trace.length) {
                        context = resolveModule(trace);
                    } else if (!context) {
                        context = object;
                    }

                    // if (name == "modal") debugger

                    if (Object.getPrototypeOf(body) ==
                        Object.getPrototypeOf({}) && !context[name]) {
                        body = {};
                        writable = false;
                    } else if (typeof body === "function") {
                        enumerable = false;
                        writable = true;
                    }

                    // Object.getOwnPropertyDescriptor(context, name).configurable
                    try {
                        // está sendo reescrito o windows, por algum motivo.
                        // se uma chave já existe, no caso esPhinx.ui.windows, ela pode receber um objeto, caso, sendo um hash, não faria sentido uma chave ser reescrita, porque um hash pode ter multiplas chaves e valores

                        Object.defineProperty(context, name, {
                            value: body,
                            writable: writable,
                            configurable: writable,
                            enumerable: enumerable
                        });
                    } catch (e) {
                        if (verbose) {
                            console.warn("Property \"" + name +
                                "\" of class \"" + context.name +
                                "\" can't be redefined because " +
                                "it's configured as read-only.");
                        }
                    }

                    // if (name == "modal") debugger

                });

            }

        }

    });

})(Extensor);

{'fraction_non_alphanumeric': 0.08702213279678069, 'fraction_numerical': 0.00033534540576794097, 'mean_word_length': 0.7616656822209096, '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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1879285', 'n_tokens_mistral': 1291, 'n_tokens_neox': 1145, 'n_words': 290}