set_utils

A set of utilities for performing set operations on arrays (as if they were sets). All the methods will also take sets.

Description:
  • A set of utilities for performing set operations on arrays (as if they were sets). All the methods will also take sets.

Source:

Methods

(static) unique(input) → {Array|Set}

Description:
  • Returns an array with only the unique values in the source array.

Source:
Parameters:
Name Type Description
input Array | Set

an array (a set is OK but this method won't do anything)

Returns:

an array or set with unique values only (matching the type of the argument).

Type
Array | Set