isImmutable()

True if maybeImmutable is an Immutable Collection or Record.

isImmutable(maybeImmutable: unknown): boolean

Discussion

Note: Still returns true even if the collections is within a withMutations().

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