Skip to content

Conversation

@khalilrached
Copy link

This pull request enhances the transformKey function to accept an optional parameter currentDepth. This change allows for greater flexibility in transforming keys based on the depth of the current object during flattening.

Changes Made:

  • Updated the transformKey function signature to accept an optional parameter currentDepth.
  • Modified the function calls within the flatten function to pass the currentDepth parameter to the transformKey function.
  • Added unit tests to ensure the transformKey function correctly handles the currentDepth parameter.

Advantage:

  • With this enhancement, users can now customize key transformations based on the depth of the current object, providing more control and adaptability in flattening nested structures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant