isCollection()

True if maybeCollection is a Collection, or any of its subclasses.

isCollection(maybeCollection: unknown): boolean

Discussion

const { isCollection, Map, List, Stack } = require('immutable'); isCollection([]); // false isCollection({}); // false isCollection(Map()); // true isCollection(List()); // true isCollection(Stack()); // truerun it
This documentation is generated from immutable.d.ts. Pull requests and Issues welcome.