Links

equals

equals :: a → a → Boolean
Takes a value val, of any type, and returns a new function evaluating that the received value equals val (the one previously defined).
const isHello = equals('hello');
​
isHello('hello'); // → true
isHello('lorem'); // → false
​
​
const isObj = equals({ foo: 'bar', deep: { prop: 1 } });
​
isObj({ foo: 'bar', deep: { prop: 1 }); // → true
isObj({ foo: 'ops', deep: { prop: 2 }); // → false
isObj('hello'); // → false