Returns whether this map is empty.
This is equivalent to this.size === 0
and this.entryCount === 0
.
The number of characters in this map. This is different from entryCount.
This is equivalent to [...this.keys()].reduce((count, range) => count + range.max - range.min + 1, 0)
.
Returns a new map with all values mapped by the given function.
If no function is given, the identity function is used.
Invokes the given callback for every item of the character map.
This method is implemented more efficiently than other iterator based methods, so chose forEach
where every
possible.
A map from characters to generic values.
The map guarantees that there are no adjacent character ranges that map to the equal values, will always be iterated as one character range. The equality of values is given by JavaScript's strict equality operator (
===
).