Overview
Collection type guards help you confirm whether a value is an instance of a specific built‑in collection type. They return simple booleans, never throw, and never mutate input.
- isMap: Checks whether a value is a
Mapinstance. - isSet: Checks whether a value is a
Setinstance. - isTypedArray: Checks whether a value is any typed array (
Uint8Array,Float32Array, etc.). - isWeakMap: Checks whether a value is a
WeakMapinstance. - isWeakSet: Checks whether a value is a
WeakSetinstance.
Each helper is pure, predictable, and safe to use in branching logic or before normalization.