javascript-collections-framework
    Preparing search index...

    Function isSetCollection

    • Returns whether value is a set from this library — a HashSet or any other set — of the same major version, from any loaded copy of the package. Native Set is not.

      Time: O(1), plus any getter or proxy trap that reading a property of value runs.

      Parameters

      • value: unknown

        Any value.

      Returns value is ReadonlySetCollection<unknown>

      true when value is a library set.

      whatever a getter or proxy trap on value throws while the property is read.

      isSetCollection(new HashSet([1])) // true
      isSetCollection(new Set([1])) // false