These are chat archives for ramda/ramda

Feb 2019
Feb 19 06:33

Hello everyone! Is it possible do it better?

dissoc('buttonQ', dissoc('viewQ', defaultConfig))

Feb 19 06:42
I would like to pass properties array what I want to remove from source object. How can I do that? )
Kurt Milam
Feb 19 12:27

@kirill If you're up for partial.lenses, you can use L.propsExcept like this:

L.get(L.propsExcept('viewQ', 'buttonQ'), {id: 1, q: '?', viewQ: 1, buttonQ: 2})
// ->  { "id": 1, "q": "?" }

I'm pretty sure that will preform better than calling dissoc once per property you'd like to remove.

Ben Briggs
Feb 19 15:10
@kirillurgant R.omit(['buttonQ', 'viewQ'])