Check out v4 of the Fauna CLI

v4 of the Fauna CLI is now in beta.

The new version introduces enhancements to the developer experience, including an improved authentication workflow. To get started, check out the CLI v4 quick start.

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
  ]
}

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!