question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`all` fails on objects?

See original GitHub issue

Is this intentional?

all(x=>x<5)([1,5]) // false
all(x=>x<5)({a:1, b:5}) // true

In lodash there is very handy all = every method which acts equally on arrays and objects, so it is surprising to see that Ramda’s all behaves differently.

http://ramdajs.com/repl/?v=0.23.0#?all(x%3D>x<5)([1%2C5]) %2F%2F false all(x%3D>x<5)({a%3A1%2C b%3A5}) %2F%2F true

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:30 (24 by maintainers)

github_iconTop GitHub Comments

1reaction
davidchamberscommented, Apr 29, 2019

@dmitriz, you might prefer S.all:

> S.all (S.lt (5)) ([1, 5])
false

> S.all (S.lt (5)) ([1, 2, 3])
true

> S.all (S.lt (5)) ({a: 1, b: 5})
false

> S.all (S.lt (5)) ({a: 1, b: 2, c: 3})
true
1reaction
CrossEyecommented, May 3, 2017

@dmitriz:

A proposed implementation is only the start of a PR…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Overload Object Fails (OOF!) All Characters - YouTube
Overload Object Fails (OOF!) All Characters. 71K views 5 years ago. Pen BFDI. Pen BFDI. 10.2K subscribers. Subscribe.
Read more >
Objects Have Failed - Dreamsongs
What can it mean for a programming paradigm to fail? ... The statement "everything is an object" says that OO is universal, ...
Read more >
Error - JavaScript - MDN Web Docs - Mozilla
Error objects are thrown when runtime errors occur. The Error object can also be used as a base object for user-defined exceptions.
Read more >
objects.all() query not working - python - Stack Overflow
When I use objects.get(), I receive an error that 2 objects were received. That means that the queries are getting the rows from...
Read more >
toEqual fails for objects with the same members but of different ...
Is there any way to compare the properties of an object and ignore differences in constructor function? I.e. something like deepEqual() in Chai...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found