-
Notifications
You must be signed in to change notification settings - Fork 44
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
Fix empty objects not being declared #9
Fix empty objects not being declared #9
Conversation
@@ -18,7 +18,7 @@ tests = [{ | |||
}, { | |||
m: 'a' | |||
, o: [{b: 1}] | |||
, e: null | |||
, e: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why an empty object? I think a null
is more appropriate since you asked for a
and that didn't match anything, just like in the second test case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a consequence. See notes below.
efae5a1
to
6b0e3ce
Compare
@nemtsov PR updated. |
6b0e3ce
to
21eaf99
Compare
ping @nemtsov |
Apologies for the delay; I haven't had much time to thoroughly review this last week. There are two changes in this PR. The bug-fix ("if not array -> _properties" one) I completely agree with and am ready to merge and the "if plain object -> {}" one, which needs more work. So, if you extract the former into a separate PR, I'll merge it ASAP. Regarding the latter, there are two issues I see with it:
|
@fixe I merged your other PR. Thanks! |
21eaf99
to
9ae8130
Compare
20c2104
to
a9ced1a
Compare
@nemtsov I added another commit to this PR. I had to change the This was done because Also, in regard to your previous questions:
Absolutely correct. Fixed by the latest commit.
In my opinion,
Fixed by the latest commit. |
a9ced1a
to
0ce14b6
Compare
ping @nemtsov |
Totally lost track of this PR. Will review / merge or comment on it this week. |
ping @nemtsov |
Needed this PR again today. Here's what I was doing: const data = {
user: {
lastName: 'foo'
}
};
mask(data, 'user(firstName)'); The above mask was returning @nemtsov any chance you could take a look at this? |
Just wanted to let you know that I haven't forgotten about this and want to merge it in. I'll respond with specific comments as soon as I have some time. |
@nemtsov any chance of merging this one? |
Merged. Thank you for your contribution and patience. |
No description provided.