<commit_before>import isObject from 'isobject';
import isPlainObject from 'is-plain-object';

const hasOwnProperty = Object.prototype.hasOwnProperty;
const toString = Object.prototype.toString;

export const has = (object, property) => hasOwnProperty.call(object, property);
export const each = (object, action) => {
  if (object && typeof object === 'object') {
    // eslint-disable-next-line no-restricted-syntax
    for (const key in object) {
      if (has(object, key)) {
        action(object[key], key);
      }
    }
  }
};

export const isArray = actual => Array.isArray(actual);
export const isDate = actual => toString.call(actual) === '[object Date]';

const noop = () => {};
export const combine = validators => validators.reduce(
  (previous, current) => (
    current ? (actual => previous(actual) || current(actual)) : previous
  ),
  noop,
);

export {
  isObject,
  isPlainObject,
};<commit_msg>Cleanup utils exports<commit_after>import isObject from 'isobject';
import isPlainObject from 'is-plain-object';

const hasOwnProperty = Object.prototype.hasOwnProperty;
const toString = Object.prototype.toString;

const has = (object, property) => hasOwnProperty.call(object, property);
const each = (object, action) => {
  if (object && typeof object === 'object') {
    // eslint-disable-next-line no-restricted-syntax
    for (const key in object) {
      if (has(object, key)) {
        action(object[key], key);
      }
    }
  }
};

const isArray = actual => Array.isArray(actual);
const isDate = actual => toString.call(actual) === '[object Date]';

const noop = () => {};
export const combine = validators => validators.reduce(
  (previous, current) => (
    current ? (actual => previous(actual) || current(actual)) : previous
  ),
  noop,
);

export {
  isDate,
  each,
  has,
  isArray,
  isObject,
  isPlainObject,
};
{'fraction_non_alphanumeric': 0.14967462039045554, 'fraction_numerical': 0.0, 'mean_word_length': 3.92, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '5746510', 'n_tokens_mistral': 562, 'n_tokens_neox': 566, 'n_words': 148}