isOrdered()

True if maybeOrdered is a Collection where iteration order is well defined. True for Collection.Indexed as well as OrderedMap and OrderedSet.

isOrdered(maybeOrdered: unknown): boolean

Discussion

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