{"size": 453, "ext": "js", "max_stars_repo_path": "src/external/shallow-compare/index.js", "max_stars_repo_name": "LudumDare/ludumdare", "max_stars_repo_stars_event_min_datetime": "2015-01-01T14:36:09.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-18T23:10:11.000Z", "max_issues_repo_path": "src/external/shallow-compare/index.js", "max_issues_repo_name": "mikekasprzak/ludumdare", "max_issues_repo_issues_event_min_datetime": "2015-06-21T19:16:34.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-14T16:07:18.000Z", "max_forks_repo_path": "src/external/shallow-compare/index.js", "max_forks_repo_name": "mikekasprzak/ludumdare", "max_forks_repo_forks_event_min_datetime": "2015-07-26T12:43:29.000Z", "max_forks_repo_forks_event_max_datetime": "2021-10-06T05:36:46.000Z"}
{"max_stars_count": 514, "max_issues_count": 1048, "max_forks_count": 114, "avg_line_length": 23.8421052632, "max_line_length": 109, "alphanum_fraction": 0.6953642384}
// Pulled from react-compat
// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349
export function shallowDiff(a, b) {
	for (let i in a)
		if (!(i in b))
			return true;
	for (let i in b)
		if (a[i] !== b[i])
			return true;
	return false;
}

export default (instance, nextProps, nextState) => {
	return (
		shallowDiff(instance.props, nextProps) ||
		shallowDiff(instance.state, nextState)
	);
};
