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

Skipping blank values at stringify #307

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@douglira
Copy link

douglira commented Apr 12, 2019

No description provided.

@ljharb
Copy link
Owner

ljharb left a comment

Hmm - "blank" isn't really a universal definition. Perhaps this would be better as a generic skip option? It would take a function, be passed key and value, and return true to skip. That way it could also subsume the skipNulls option (it would throw if both were passed), and then you could define your own definition for what to skip.

We'd want to add the same option to both parse and stringify.

@@ -308,6 +309,7 @@ var stringify = function stringify( // eslint-disable-line func-name-matching
prefix,
generateArrayPrefix,
strictNullHandling,
skipBlanks,

This comment has been minimized.

Copy link
@ljharb

ljharb Apr 12, 2019

Owner

All changes made in this autogenerated file are lost; you'll need to change the files in lib instead.

@douglira

This comment has been minimized.

Copy link
Author

douglira commented Apr 12, 2019

It makes sense and more suitable. I will give it a try asap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.