<commit_before>const FunctionProps = Object.getOwnPropertyNames(Function.prototype);

const symOuterMixin = Symbol('outerMixin');
const symAppliedInterfaces = Symbol('appliedInterfaces');
const symClassType = Symbol('classType');

/**
 * @internal
 */
class Mixins {
    /**
     * Creates a new mixin.
     *
     * @param {Function} definition
     * @param {undefined|Function} cb Modify the newly created inner mixin
     * @param {undefined|Function} constructCb Function to be called on construction
     *
     * @returns {Function}
     */
    static createMixin(definition, cb = undefined, constructCb = undefined) {
        let mixin = (superclass) => {
            let m = class extends superclass {
                constructor() {
                    super(...arguments);

                    if (undefined !== constructCb) {
                        constructCb(this);
                    }
                }
            };

            m.isMixin = true;

            if (undefined !== cb) {
                cb(m);
            }

            return m;
        };

        definition[symOuterMixin] = mixin;

        for (let constant of Mixins.getConstantsNames(definition)) {
            mixin[constant] = definition[constant];
        }

        return mixin;
    }

    static getMixin(definition) {
        return definition[symOuterMixin];
    }

    /**
     * Get function names
     *
     * @param {Function} definition
     * @internal
     */
    static getFunctions(definition) {
        let chain = this._getClassChain(definition);

        return Array.from(function * () {
            for (let i of chain) {
                yield * Object.getOwnPropertyNames(i)
                    .filter(P => {
                        if ('constructor' === P) {
                            return false;
                        }

                        return 'function' === typeof i[P];
                    });
            }
        }());
    }

    /**
     * Get all constants names for definition.
     *
     * @param {Function} definition
     *
     * @returns {string[]}
     * @internal
     */
    static getConstantsNames(definition) {
        let chain = this._getClassChain(definition);

        return Array.from(function * () {
            for (let i of chain) {
                yield * Object.getOwnPropertyNames(i)
                    .filter(P => {
                        if ('__reflection' === P || 'prototype' === P) {
                            return false;
                        }<commit_msg>fixed interfaces methods implementation checks<commit_after>const FunctionProps = Object.getOwnPropertyNames(Function.prototype);

const symOuterMixin = Symbol('outerMixin');
const symAppliedInterfaces = Symbol('appliedInterfaces');
const symClassType = Symbol('classType');

/**
 * @internal
 */
class Mixins {
    /**
     * Creates a new mixin.
     *
     * @param {Function} definition
     * @param {undefined|Function} cb Modify the newly created inner mixin
     * @param {undefined|Function} constructCb Function to be called on construction
     *
     * @returns {Function}
     */
    static createMixin(definition, cb = undefined, constructCb = undefined) {
        let mixin = (superclass) => {
            let m = class extends superclass {
                constructor() {
                    super(...arguments);

                    if (undefined !== constructCb) {
                        constructCb(this);
                    }
                }
            };

            m.isMixin = true;

            if (undefined !== cb) {
                cb(m);
            }

            return m;
        };

        definition[symOuterMixin] = mixin;

        for (let constant of Mixins.getConstantsNames(definition)) {
            mixin[constant] = definition[constant];
        }

        return mixin;
    }

    static getMixin(definition) {
        return definition[symOuterMixin];
    }

    /**
     * Get function names
     *
     * @param {Function} definition
     * @internal
     */
    static getFunctions(definition) {
        let chain = this._getClassChain(definition);

        return Array.from(function * () {
            for (let i of chain) {
                yield * Object.getOwnPropertyNames(i.prototype)
                    .filter(P => {
                        if ('constructor' === P) {
                            return false;
                        }

                        return 'function' === typeof i.prototype[P];
                    });
            }
        }());
    }

    /**
     * Get all constants names for definition.
     *
     * @param {Function} definition
     *
     * @returns {string[]}
     * @internal
     */
    static getConstantsNames(definition) {
        let chain = this._getClassChain(definition);

        return Array.from(function * () {
            for (let i of chain) {
                yield * Object.getOwnPropertyNames(i)
                    .filter(P => {
                        if ('__reflection' === P || 'prototype' === P) {
                            return false;
                        }
{'fraction_non_alphanumeric': 0.10661980082015231, 'fraction_numerical': 0.0, 'mean_word_length': 1.4660568127106404, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1029719', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1253, 'n_words': 304}