<commit_before>/**
 * @file PureRender vendor
 * @author liangxiaojun(<EMAIL>)
 */

import isEqual from 'lodash/isEqual';

function shouldComponentUpdate(nextProps, nextState) {
    return !isEqual(this.props, nextProps) || !isEqual(this.state, nextState);
}

function PureRender(component) {
    if (component.prototype.shouldComponentUpdate === undefined) {<commit_msg>update PureRender<commit_after>/**
 * @file PureRender vendor
 * @author liangxiaojun(<EMAIL>)
 */

function isObject(value) {
    return value != null && typeof value === 'object';
}

function equal(x, y) {

    if (x === y) {
        return true;
    }

    if (x == null || y == null || (!isObject(x) && !isObject(y))) {
        return x !== x && y !== y;
    }

    const xProps = Object.keys(x),
        yProps = Object.keys(y),
        xLen = xProps.length,
        yLen = yProps.length;

    if (xLen !== yLen) {
        return false;
    }

    for (let prop of xProps) {
        if (hasOwnProperty.call(y, prop)) {
            if (!equal(x[prop], y[prop])) {
                return false;
            }
        } else {
            return false;
        }
    }

    return true;

}

function shouldComponentUpdate(nextProps, nextState) {
    return !equal(this.props, nextProps) || !equal(this.state, nextState);
}

function PureRender(component) {
    if (component.prototype.shouldComponentUpdate === undefined) {
{'fraction_non_alphanumeric': 0.14684813753581663, 'fraction_numerical': 0.0, 'mean_word_length': 2.7055702917771884, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1330809', 'n_tokens_mistral': 450, 'n_tokens_neox': 433, 'n_words': 103}