<commit_before>var R = require('ramda')

exports.exists = R.curry(R.compose(R.not, R.prop))
exports.selected = R.curry(R.compose(R.equals('-- select an option --'), R.prop))
exports.check_tests = (tests, values) =>
  R.reduce(function (errors, field) {
    return tests[field](field)(values)
      ? R.assoc(field, 'Required', errors)
      : errors
    }, {}, R.keys(tests))<commit_msg>a little more es6 gone<commit_after>var R = require('ramda')

exports.exists = R.curry(R.compose(R.not, R.prop))
exports.selected = R.curry(R.compose(R.equals('-- select an option --'), R.prop))
exports.check_tests = function (tests, values) {
  return R.reduce(function (errors, field) {
    return tests[field](field)(values)
      ? R.assoc(field, 'Required', errors)
      : errors
    }, {}, R.keys(tests))
  }
{'fraction_non_alphanumeric': 0.18703241895261846, 'fraction_numerical': 0.0012468827930174563, 'mean_word_length': 3.95679012345679, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1049539', 'n_tokens_mistral': 281, 'n_tokens_neox': 280, 'n_words': 55}