The entities in the array.
The name of the property to check for distinct values by.
let todos: Todo[] = [
{ id: 1, title: "Lets do it!" },
{ id: 1, title: "Lets do it again!" },
{ id: 2, title: "All done!" }
];
let todos2: Todo[] = [
{ id: 1, title: "Lets do it!" },
{ id: 2, title: "All done!" }
];
expect(unique(todos, "id")).toBeFalsy();
expect(unique(todos2, "id")).toBeTruthy();
Generated using TypeDoc
Returns true if all the entities are distinct by the
property
value argument.