javascript-collections-framework
    Preparing search index...

    Function isSortedMap

    • Returns whether value is a sorted map from this library — a TreeMap, one of its range views or a reversed view — of the same major version, from any loaded copy of the package. A HashMap, native Map and the key set of a sorted map (a sorted 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 ReadonlySortedMap<unknown, unknown>

      true when value is a library sorted map.

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

      isSortedMap(new TreeMap([[1, 'a']])) // true
      isSortedMap(new HashMap([[1, 'a']])) // false