Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for unflatten function #9

Merged
merged 9 commits into from
Nov 7, 2023

Conversation

Pana-g
Copy link
Contributor

@Pana-g Pana-g commented Oct 16, 2023

Closes #8

@danilofuchs
Copy link
Owner

Hi! Thanks for your PR, just got around to look at it. I will add some tests and get it merged/published!

@danilofuchs
Copy link
Owner

Hi @Pana-g!
I ported the relevant test cases from https://github.com/hughsk/flat/blob/master/test/test.js

I decided to not support nested maps for now:

{a.b: 123, a: {c: 321}}

There is one failing test for a map inside a list:

test.0.a: 123

Are you available to take a look?

@Pana-g
Copy link
Contributor Author

Pana-g commented Nov 7, 2023

Hi @danilofuchs ! Thanks for the feedback! Indeed there were some issues with the unflatten function, I also found some issues in some of the tests and fixed them as well!

@danilofuchs
Copy link
Owner

Great!
I added a check to disallow nested maps at all. I'll generate a release

@danilofuchs danilofuchs merged commit efbb316 into danilofuchs:master Nov 7, 2023
1 check passed
@danilofuchs
Copy link
Owner

Released!

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.

Feature: Unflatten
3 participants