selfrefactor / rambdax

Extended version of Rambda
https://selfrefactor.github.io/rambdax
MIT License
221 stars 26 forks source link

pathOr not returns defaultValue when pathToSearch is false #39

Closed makarkotlov closed 5 years ago

makarkotlov commented 5 years ago

I don't know is it intentional, but I honestly anticipated defaultValue, but got an obj instead

selfrefactor commented 5 years ago

I will check it out later and get back to you.

selfrefactor commented 5 years ago

I am closing this as it works as expected.

You can see for yourself that Ramda returns the same result:

https://ramdajs.com/repl/#?R.pathOr%28%27foo%27%2C%20false%2C%20%7B%20x%20%3A%20%7B%20y%20%3A%201%20%7D%20%7D%29