Extending the solution from @LudwigMagnusson, a bit, you could do this:
And of course, you could use it like:
var myFilter = rejectPathVal('providers.github.login', 'userName1');
or in any way that you choose, given that it is fully loaded. Although, as Ludwig noted, pathEq not part of the released version of Ramda, you can get it by downloading the HEAD version from Github, or you can use the Ludwig version mentioned above.
But I want to ask your requirements a little. I welcome your attempt to move to a more functional style. I am one of the authors of Ramda, and I think this is a great choice for the library, but it seems unnecessary:
Make the implementation as short as possible by drawing on existing functions in the Ramda library as much as possible.
I would suggest that the goals of readability should always surpass those of short duration. Of course, elegance and readability are often associated with multiplicity, but "as short as possible" should never be a driving target.
source share