<commit_before>/*! Angular ObjectKey 0.1.1 | Copyright (c) 2014 <NAME> | MIT License */

'use strict';

angular.module('ObjectKey', []).

constant('ObjectKey', new function() {
  var _deepTransform = function(style) {
    var stylize = function(object, config) {
      /*
      // config
      // | except
      */

      var config = config || {},
          o = {},
          isException;

      if (config.except instanceof RegExp) {
        isException = function(string) {
          return string.match(config.except);
        };
      } else {
        isException = function() {return false};
      }

      for (var k in object) {
        object.hasOwnProperty(k) && (
          o[isException(k) ? k : style(k)] = 'object' === typeof object[k] ? stylize(object[k]) : object[k]
        );
      }

      return o;
    };

    return stylize;<commit_msg>Cache the filtering function<commit_after>/*! Angular ObjectKey 0.1.1 | Copyright (c) 2014 <NAME> | MIT License */

'use strict';

angular.module('ObjectKey', []).

constant('ObjectKey', new function() {
  var _deepTransform = function(style) {
    var isException,
        stylize = function(object, config) {
          /*
          // config
          // | except
          */

          var config = config || {},
              o = {};

          if (!isException) {
            if (config.except instanceof RegExp) {
              isException = function(string) {
                return string.match(config.except);
              };
            } else {
              isException = function() {return false};
            }
          }

          for (var k in object) {
            object.hasOwnProperty(k) && (
              o[isException(k) ? k : style(k)] = 'object' === typeof object[k] ? stylize(object[k]) : object[k]
            );
          }

          return o;
        };

    return stylize;
{'fraction_non_alphanumeric': 0.13994638069705093, 'fraction_numerical': 0.007506702412868633, 'mean_word_length': 1.7201166180758019, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3059654', 'n_tokens_mistral': 547, 'n_tokens_neox': 518, 'n_words': 126}