-
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
* returns extra falsey values at the level of the wildcard #11
Comments
Thanks for reporting this. I'd expect the same result as you (without |
Quick and dirty fix... Line 36 in 3109601
@@ -35,5 +35,6 @@
for (retKey in ret) {
if (!util.has(ret, retKey)) continue
+ if (util.isEmpty(ret[retKey])) continue
maskedObj[retKey] = ret[retKey]
} |
@yckart thank you for your contribution. If you're interested in making the code above into a PR with the change and test, I'll review and merge it asap. |
@nemtsov But I'm not sure, what's falsey?
...are empty arrays/objects/strings "empty values" too?
...and those?
|
- add `compiledMask` argument validation - add support for overlapped fields (related with nemtsov#16) - fix: filter should return null if `obj` argument is not Array or PlainObject - fix: wildcard `*` bug (nemtsov#11) - fix: extra fields with falsy values in masked object (nemtsov#16) - remove `util.has` from for..in loops (internal used objects have no iterable fields in prototypes) - remove `util.isEmpty` from test for empty Array
Is this intended? I was expecting:
The text was updated successfully, but these errors were encountered: