Skip to content

isMap

Return true if the given value is a Map. Instances from [other realms][1] are also supported. [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof#instanceof_and_multiple_realms

Usage

isMap(new Map()); // => true
isMap(new Set()); // => false

Installation

Terminal window
npx atmx add helper is-map