Skip to content

Conversation

auvred
Copy link
Contributor

@auvred auvred commented Aug 8, 2025

Special_Casing uses Map<number, number[]>

specialCasingMap["Uppercase" + storageKeyPostfix] ??= new Map();
specialCasingMap["Uppercase" + storageKeyPostfix].set(from, uppercase);

const uppercase = data[3] === "" ? [] : data[3].split(' ').map(function(codePoint) {

Case_Folding uses Map<number, number[]> for full case folding (it's always one-to-many mapping). Map<number, number> for common, simple and special case foldings foldings (which are guaranteed to be one-to-one mappings).

caseFoldingMap[status].set(
codePoint,
mappings.length == 1 ? mappings[0] : mappings
);

Copy link
Contributor

@JLHwung JLHwung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@mathiasbynens
Copy link
Collaborator

Cheers!

@mathiasbynens mathiasbynens merged commit a5acf24 into node-unicode:main Aug 28, 2025
1 check passed
@mathiasbynens
Copy link
Collaborator

…and this is now released. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants