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 a filter option #81

Merged
merged 2 commits into from May 21, 2015
Merged

Add a filter option #81

merged 2 commits into from May 21, 2015

Conversation

ghost
Copy link

@ghost ghost commented Apr 21, 2015

This matches JSON.stringify(), which accepts a filter function or property list as its second argument. If a function is specified, it is called to obtain the replacement value. Otherwise, if an array is specified, it is used to select properties and array indices for stringification.

This could be accomplished via a deep copy in user code, but I think it's useful to have—especially since qs.stringify traverses the object, anyway.

@nlf
Copy link
Collaborator

nlf commented May 20, 2015

sorry for the delay, i'll get this reviewed soon.

@nlf nlf self-assigned this May 20, 2015
@ghost
Copy link
Author

ghost commented May 20, 2015

@nlf No rush. Thanks! ⭐

@nlf nlf added this to the 3.0.0 milestone May 21, 2015
@nlf
Copy link
Collaborator

nlf commented May 21, 2015

@kitcambridge mind updating this so it will merge cleanly and adding some docs? then i'll be happy to merge it and get it into the 3.0.0 release

Kit Cambridge added 2 commits May 21, 2015 14:17
This matches `JSON.stringify()`, which accepts a filter function or
property list as its second argument. If a function is specified, it
is called to obtain the replacement value. Otherwise, if an array is
specified, it is used to select properties and array indices for
stringification.
@ghost
Copy link
Author

ghost commented May 21, 2015

@nlf All set. Thanks again!

nlf added a commit that referenced this pull request May 21, 2015
@nlf nlf merged commit 05a5855 into ljharb:master May 21, 2015
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.

1 participant