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 parseRepeated function #85

Closed
wants to merge 1 commit into from

Conversation

BernabeFelix
Copy link

This is a proposed solution for this #60
It basically uses the same code than parse but instead of assign in once, it concatenates it to an array.

E.g.

'foo=false;bar=bar;foo=true' 

Becomes

{ foo: ['false', 'true'], bar: ['bar'] }

I tried to follow the current code style, used the same tests and benchmarks but I'm sure there's place for improvements.

@dougwilson

@dougwilson dougwilson added the pr label Feb 15, 2019
@Poyoman39
Copy link

Any news about this PR ? Have the same issue with npm cookie

@jacklrs
Copy link

jacklrs commented Jul 16, 2019

Maybe this code duplication prevents this being merged. What about leverage existing "options" object adding a new key to configure desired behaviour? For instance it the name of this option could be "parseToArray" with default false ...

@dougwilson
Copy link
Contributor

Yes, @jacklrs that makes the most sense -- add an option to the existing parse function. It would have minimal code duplication as well.

@dougwilson
Copy link
Contributor

Actually, looks like this was implemented in #108 , so I'm going to close this in favor of that PR 👍

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

Successfully merging this pull request may close these issues.

None yet

5 participants