Skip to content

Equality

Equality<A> = (a, b) => boolean

Defined in: Core/Equality.ts:14

A function that checks whether two values of type A are equal. Use built-in instances (Equality.string, Equality.number, etc.) as starting points, then adapt them with Equality.by and combine them with Equality.and.

A

A

A

boolean

type User = { id: string; name: string };
const byId = pipe(Equality.string, Equality.by((u: User) => u.id));

pipe(users, Arr.uniqWith(byId));