javascript-collections-framework
    Preparing search index...

    Function isMapCollection

    • Returns whether value is a map from this library — a HashMap or any other map — of the same major version, from any loaded copy of the package. Native Map is not, and neither are the views a map returns (they are collections).

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

      Parameters

      • value: unknown

        Any value.

      Returns value is ReadonlyMapCollection<unknown, unknown>

      true when value is a library map.

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

      isMapCollection(new HashMap([['a', 1]])) // true
      isMapCollection(new Map([['a', 1]])) // false