-
Notifications
You must be signed in to change notification settings - Fork 27
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
Missing dissocIn. #14
Comments
I'm keeping an eye on this: http://dev.clojure.org/jira/browse/CLJ-1063 There's an open question as to whether empty arrays/objects in the hierarchy would be dissoc'd as well. In the meantime you can use |
+1 for this API |
@neekey Should i.dissocIn({
a: {
b: {
c: 1
},
a2: 1
}, ['a', 'b', 'c'])` return {
a: {
b: {}
},
a2: 1
} or {
a2: 1
} (e.g. should it remove intermediate empty collections) |
hi @aearly I think it shouldn't remove intermediate empty collections. It's kind of an unexpected behavior if it does so. In a normal const obj = { a: { b: 1 } };
delete obj.a.b;
console.log( obj.a ); // output: '{}' |
Hi @aearly any progress for this feature? |
I haven't decided what to do exactly. It's not pressing since there's a workaround. |
Closed in #37 ! |
Just as
dissoc
is the pair toassoc
but removes a key,dissocIn
should be the pair toassocIn
and remove the key at the end of a path (passed as an array).The text was updated successfully, but these errors were encountered: