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

when array is empty,outputs should be empty #377

Closed
newpost opened this issue Aug 7, 2020 · 1 comment
Closed

when array is empty,outputs should be empty #377

newpost opened this issue Aug 7, 2020 · 1 comment

Comments

@newpost
Copy link

newpost commented Aug 7, 2020

1)qs.stringify({ a: [] }, { indices: false, arrayFormat: "comma" }) // output is a=
2)qs.stringify({ a: [] }, { indices: false }) // output is  empty

I want the first case to be empty as well

@ljharb
Copy link
Owner

ljharb commented Jan 13, 2021

indices: false is equivalent to arrayFormat: 'repeat'.

This seems like it's covered in tests added in #350, which was merged a few weeks after this was filed, but has not yet been released.

@ljharb ljharb closed this as completed Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants