The Fauna service will be ending on May 30, 2025.

For more information on the service wind down, see our announcement and the Fauna Service End-of-Life FAQ.

array.toSet()

Convert an Array to a Set.

Signature

toSet() => Set<A>

Description

Converts the calling Array to a Set.

The calling Array isn’t changed.

Parameters

None

Return value

Type Description

Set<Generic>

Set representation of the Array instance.

Examples

[1, 2].toSet()
{
  data: [
    1,
    2
  ]
}
\