Reputation: 44957
Since there is no R.some, how do I implement the following in Ramda?
R.some
const hasKey = (predicate, object) => Object.keys(object) .map(key => object[key]) .some(predicate);
Upvotes: 2
Views: 1300
Reputation: 665070
Since there is no R.some …
It's known as any.
any
how do I implement the following in Ramda?
You would write
const hasKey = (p, o) => R.any(p, R.values(o))
Upvotes: 5