Optionaloptions: MapConstraintOptions<K, V>Static ReadonlyBREAKReturn this from a forEach callback to stop iterating.
Clears this map and cleans up its constraints.
Optionalsilent: boolean
If true, don't invalidate the constraints that depended on it
With no arguments: a plain object of the entries (see toObject). With key: the value for
key. With key and value (and optionally index): sets the value for key (see put).
With no arguments: a plain object of the entries (see toObject). With key: the value for
key. With key and value (and optionally index): sets the value for key (see put).
A constraint whose value is the value for key (which can itself be a constraint).
The key of an entry whose value is value (or undefined).
OptionalequalityCheck: EqualityCheck<V>
How to compare values (default: this map's value equality check)
Removes the entry for key (like delete this[key]).
Optionalsilent: boolean
If true, don't invalidate the constraints that depended on the entry
Change how keys are hashed: a function, or the name of a method to call on each key.
Change how values are compared (for keyForValue).
Change how values are hashed (see the valuehash option); false turns value hashing off.
Note: the preferred way to create a map constraint is with
cjs({...})orcjs.map(options).Emulates a JavaScript object (or
Map), but with constraints. Its entries are ordered, and its keys can be anything (compared with===unless anequalsoption is given).Example