javascript-collections-framework
    Preparing search index...

    Function isSortedSet

    • Returns whether value is a sorted set from this library — a TreeSet, one of its range views or a reversed view — of the same major version, from any loaded copy of the package. A HashSet and native Set are 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 ReadonlySortedSet<unknown>

      true when value is a library sorted set.

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

      isSortedSet(new TreeSet([1]))  // true
      isSortedSet(new HashSet([1])) // false