<commit_before>var isPlainObject = require('../lang/isPlainObject')
var objContains = require('../object/contains')
var arrContains = require('../array/contains')
var reContains = require('../regex/contains')
var isRegExp = require('../lang/isRegExp')

// a dupe of collection/contains.js although not as eloquent. will develop
// this version further for strings and/or functions then build
// a comprehensive make function.
function matches (obj, val) {
  if (Array.isArray(obj)) return arrContains(obj, val)
  if (isRegExp(obj)) return reContains(obj, val)
  if (isPlainObject(obj)) return objContains(obj, val)
}

module.exports = matches<commit_msg>reformat collection/matches<commit_after>// a dupe of collection/contains.js although not as eloquent. will develop
// this version further for strings and/or functions then build
// a comprehensive make function.

var isPlainObject = require('../lang/isPlainObject')
var objContains = require('../object/contains')
var arrContains = require('../array/contains')
var reContains = require('../regex/contains')
var isRegExp = require('../lang/isRegExp')

function matches (obj, val) {
  if (Array.isArray(obj)) return arrContains(obj, val)
  if (isRegExp(obj)) return reContains(obj, val)
  if (isPlainObject(obj)) return objContains(obj, val)
}

module.exports = matches
{'fraction_non_alphanumeric': 0.13378684807256236, 'fraction_numerical': 0.0, 'mean_word_length': 4.910714285714286, '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': '3188364', 'n_tokens_mistral': 386, 'n_tokens_neox': 383, 'n_words': 119}