Skip to content

Choose a tag to compare

@lukeed lukeed released this 30 Oct 02:32

Minor Changes

  • Handles Array types by recursively passing Array entires thru flat-obj

    This changes the following behavior, which was considered a bug:

    var obj = {
      foo: 123,
      bar: [
        { a:{ b:1 } },
        { a:{ b:2 } },
        { a:{ b:3 } }
      ]
    };
    
    // before:
    var output = {
      foo: 123,
      bar_0_a_b: 1,
      bar_1_a_b: 2,
      bar_2_a_b: 3
    };
    
    // now:
    var output = {
      foo: 123,
      bar: [
        { a_b: 1 },
        { a_b: 2 },
        { a_b: 3 }
      ]
    };