teamdigitale/italia-app

View on GitHub
ts/utils/enumerables.ts

Summary

Maintainability
A
0 mins
Test Coverage
/**
 * A predicate for filtering unique items in an array.
 */
export const uniqueItem = <T>(id: T, index: number, ids: ReadonlyArray<T>) =>
  index === ids.indexOf(id);