<commit_before>const {toString: toStr} = {},
    hasOwn = ({}.hasOwnProperty),
    getProto = Object.getPrototypeOf,
    fnToString = hasOwn.toString;

/**
 *
 * @param {Any} v
 * @param {boolean} catchCheck
 * @returns {boolean}
 */
function isThenable (v, catchCheck) {
    return isObject(v) &&
        typeof v.then === 'function' &&
            (!catchCheck || typeof v.catch === 'function');
}

/**
 *
 * @param {Any} val
 * @returns {string}
 */
function toStringTag (val) {
    return toStr.call(val).slice(8, -1);
}

/**
 * This function is dependent on both constructors
 *   being identical so any minimization is expected of both.
 * @param {Any} a
 * @param {function} b
 * @returns {boolean}
 */
function hasConstructorOf (a, b) {
    if (!a || typeof a !== 'object') {
        return false;
    }
    const proto = getProto(a);
    if (!proto) {
        return false;
    }
    const Ctor = hasOwn.call(proto, 'constructor') && proto.constructor;
    if (typeof Ctor !== 'function') {
        return b === null;
    }
    if (typeof Ctor === 'function' && b === Ctor) {
        return true;
    }
    if (typeof Ctor === 'function' && b !== null &&
        fnToString.call(Ctor) === fnToString.call(b)) {
        return true;
    }
    if (typeof Ctor === 'function' && typeof b === 'function' &&
        typeof Ctor.__typeson__type__ === 'string' &&
        Ctor.__typeson__type__ === b.__typeson__type__) {
        return true;
    }
    return false;
}

/**
 *
 * @param {Any} val
 * @returns {boolean}
 */
function isPlainObject (val) { // Mirrors jQuery's
    if (!val || toStringTag(val) !== 'Object') {
        return false;
    }

    const proto = getProto(val);
    if (!proto) { // `Object.create(null)`
        return true;
    }

    return hasConstructorOf(val, Object);<commit_msg>- Refactoring: Remove `typeof Ctor` checks as already established `Ctor` must be a function by this point in code<commit_after>const {toString: toStr} = {},
    hasOwn = ({}.hasOwnProperty),
    getProto = Object.getPrototypeOf,
    fnToString = hasOwn.toString;

/**
 *
 * @param {Any} v
 * @param {boolean} catchCheck
 * @returns {boolean}
 */
function isThenable (v, catchCheck) {
    return isObject(v) &&
        typeof v.then === 'function' &&
            (!catchCheck || typeof v.catch === 'function');
}

/**
 *
 * @param {Any} val
 * @returns {string}
 */
function toStringTag (val) {
    return toStr.call(val).slice(8, -1);
}

/**
 * This function is dependent on both constructors
 *   being identical so any minimization is expected of both.
 * @param {Any} a
 * @param {function} b
 * @returns {boolean}
 */
function hasConstructorOf (a, b) {
    if (!a || typeof a !== 'object') {
        return false;
    }
    const proto = getProto(a);
    if (!proto) {
        return false;
    }
    const Ctor = hasOwn.call(proto, 'constructor') && proto.constructor;
    if (typeof Ctor !== 'function') {
        return b === null;
    }
    if (b === Ctor) {
        return true;
    }
    if (b !== null && fnToString.call(Ctor) === fnToString.call(b)) {
        return true;
    }
    if (typeof b === 'function' &&
        typeof Ctor.__typeson__type__ === 'string' &&
        Ctor.__typeson__type__ === b.__typeson__type__
    ) {
        return true;
    }
    return false;
}

/**
 *
 * @param {Any} val
 * @returns {boolean}
 */
function isPlainObject (val) { // Mirrors jQuery's
    if (!val || toStringTag(val) !== 'Object') {
        return false;
    }

    const proto = getProto(val);
    if (!proto) { // `Object.create(null)`
        return true;
    }

    return hasConstructorOf(val, Object);
{'fraction_non_alphanumeric': 0.1606503168917057, 'fraction_numerical': 0.0011022320198401765, 'mean_word_length': 2.5798816568047336, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4401956', 'n_tokens_mistral': 1155, 'n_tokens_neox': 1153, 'n_words': 320}