Add option to exclude undefined values when encoding objects #71#97
Open
simonjeesam wants to merge 1 commit intokawanet:masterfrom
Open
Add option to exclude undefined values when encoding objects #71#97simonjeesam wants to merge 1 commit intokawanet:masterfrom
simonjeesam wants to merge 1 commit intokawanet:masterfrom
Conversation
AArnott
reviewed
Jun 10, 2020
| var bin = binarraybuffer ? bin_arraybuffer : bin_buffer; | ||
| var usemap = HAS_MAP && options && options.usemap; | ||
| var map = usemap ? map_to_map : obj_to_map; | ||
| var strip_undef = options && options.strip_undef; |
There was a problem hiding this comment.
how about calling it omit_undefined_properties?
undef is needlessly terse, and by spelling out the "properties" part, we're clear that it doesn't remove them from array elements.
Suggested change
| var strip_undef = options && options.strip_undef; | |
| var strip_undef = options && options.omit_undefined_properties; |
|
@AArnott can you review this PR and state what changes are required to get this merged? The original contributor may have abandoned the PR, but this would be a useful addition to the library IMO, and if the only outstanding issue is to rename the option, that should be easy to get over the line. |
AArnott
approved these changes
Aug 17, 2021
AArnott
left a comment
There was a problem hiding this comment.
The functional change looks adequate. It just could use a rename of the option.
|
Any updates on getting this PR merged? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.