<commit_before>// Copyright (c) 2015, <NAME> (twitter.com/evanxsummers)
// ISC license, see http://github.com/evanx/redexutil/LICENSE

import lodash from 'lodash';

const logger = Loggers.create(__filename, 'info');

export function values(object) {
   return Object.keys(object).map(key => object[key]);
}

function createPropPair(key, value) {
   let pair = {};
   pair[key] = value;
   return pair;
}

export function excludeProps(object, regex) {
   let props = lodash.compact(Object.keys(object).filter(key => !regex.test(key))
   .map(key => createPropPair(key, object[key])));
   return Object.assign({}, ...props);
}

export function props(object) {
   return Object.keys(object).map(key => {
      let value = object[key];
      return {key, value};
   });
}

export function formatKeys(object) {
   if (object) {
      return Object.keys(object).join(' ');
   } else {
      return 'empty';
   }
}<commit_msg>clone with exclude props<commit_after>// Copyright (c) 2015, <NAME> (twitter.com/evanxsummers)
// ISC license, see http://github.com/evanx/redexutil/LICENSE

import lodash from 'lodash';

const logger = Loggers.create(__filename, 'info');

export function values(object) {
   return Object.keys(object).map(key => object[key]);
}

function createPropPair(key, value) {
   let pair = {};
   pair[key] = value;
   return pair;
}

export function excludeKeys(object, regex) {
   let props = lodash.compact(Object.keys(object).filter(key => !regex.test(key))
   .map(key => createPropPair(key, object[key])));
   return Object.assign({}, ...props);
}

export function props(object) {
   return Object.keys(object).map(key => {
      let value = object[key];
      return {key, value};
   });
}

export function formatKeys(object) {
   if (object) {
      return Object.keys(object).join(' ');
   } else {
      return 'empty';
   }
}
{'fraction_non_alphanumeric': 0.1634199134199134, 'fraction_numerical': 0.004329004329004329, 'mean_word_length': 3.8151041666666665, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '6756493', 'n_tokens_mistral': 614, 'n_tokens_neox': 600, 'n_words': 139}