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 (===).
===
Deletes all entries in the map.
Deletes all characters in the given range.
This is equivalent to [...range].forEach(char => this.delete(char)).
[...range].forEach(char => this.delete(char))
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.
forEach
Returns the value associated with the given character of undefined if the character is not key in the map.
undefined
Returns whether the given character is a key in the map.
Returns whether every character in the given range is a key in the map.
This is equivalent to: [...chars].every(char => this.has(char)).
[...chars].every(char => this.has(char))
Returns whether some character in the given range is a key in the map.
This is equivalent to: [...chars].some(char => this.has(char)).
[...chars].some(char => this.has(char))
Returns a mapping from the values of this map to its keys.
Sets the value for all characters in the given character set.
This is equivalent to [...charSet.characters()].forEach(char => this.set(char, value)).
[...charSet.characters()].forEach(char => this.set(char, value))
Sets the value for all characters in the given range.
This is equivalent to [...chars].forEach(char => this.set(char, value)).
[...chars].forEach(char => this.set(char, value))
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 (
===
).