Options
All
  • Public
  • Public/Protected
  • All
Menu

A Collection of unique values with O(log32 N) adds and has.

When iterating a Set, the entries will be (value, value) pairs. Iteration order of a Set is undefined, however is stable. Multiple iterations of the same Set will iterate in the same order.

Set values, like Map keys, may be of any type. Equality is determined using Immutable.is, enabling Sets to uniquely include other Immutable collections, custom value types, and NaN.

Index

Functions

  • Set.fromKeys() creates a new immutable Set containing the keys from this Iterable or JavaScript Object.

    Type parameters

    • T

    Parameters

    Returns <internal>.Set<T>

  • Parameters

    • obj: {}
      • [key: string]: any

    Returns <internal>.Set<string>

  • isSet(maybeSet: any): boolean
  • True if the provided value is a Set

    Parameters

    • maybeSet: any

    Returns boolean

  • Creates a new Set containing values.

    Type parameters

    • T

    Parameters

    • Rest ...values: T[]

    Returns <internal>.Set<T>

Generated using TypeDoc