function distinct
distinct<T>(list: T[]): T[]

Returns the distinct values from a list.

Examples

Example 1

const myList = [1, 2, 3, 3];
distinct(myList); // [1, 2, 3];

Type Parameters

Parameters

list: T[]

Return Type

T[]

Usage

import { distinct } from ".";