<commit_before>object-iron
===========

Flattens deeply nested object into a single level object.

    var flatten = require('object-iron');
    var nestedObject = {
      name : {
        legal : "<NAME>",
        given : {
          first : "Samantha",
          last : "Fisherson"
        }
      },
      info : {
        needless : {
          nesting : {
            check : {
              it: "out"
            }
          }
        },
        tags : [
          "person",
          "tagged",
          "arrays are cool"
        ]
      }
    };

    var flatObject = flatten(nestedObject);
    console.log(flatObject);

    // { 'name.legal': '<NAME>',
    //   'name.given.first': 'Samantha',
    //   'name.given.last': 'Fisherson',
    //   'info.needless.nesting.check.it': 'out',
    //   'info.tags[0]': 'person',
    //   'info.tags[1]': 'tagged',
    //   'info.tags[2]': 'arrays are cool' }<commit_msg>Update README to reflect not accepting functions in objects.<commit_after>object-iron
===========

Flattens deeply nested object into a single level object.

    var flatten = require('object-iron');
    var nestedObject = {
      name : {
        legal : "<NAME>",
        given : {
          first : "Samantha",
          last : "Fisherson"
        }
      },
      info : {
        needless : {
          nesting : {
            check : {
              it: "out"
            }
          }
        },
        tags : [
          "person",
          "tagged",
          "arrays are cool"
        ]
      }
    };

    var flatObject = flatten(nestedObject);
    console.log(flatObject);

    // { 'name.legal': '<NAME>',
    //   'name.given.first': 'Samantha',
    //   'name.given.last': 'Fisherson',
    //   'info.needless.nesting.check.it': 'out',
    //   'info.tags[0]': 'person',
    //   'info.tags[1]': 'tagged',
    //   'info.tags[2]': 'arrays are cool' }

#NOTE:
At this point, objects with functions or XML will throw an error.  Planning on adding support for functions soon, and filtering options.
{'fraction_non_alphanumeric': 0.15994094488188976, 'fraction_numerical': 0.002952755905511811, 'mean_word_length': 1.5832274459974587, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2665820', 'n_tokens_mistral': 645, 'n_tokens_neox': 615, 'n_words': 141}