You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 62d5371
Browse filesBrowse the repository at this point in the historyBrowse files
perf: derive mapping symbols.mjs from code-points.mjs
For Case_Folding, Simple_Case_Mapping, Special_Casing and
Decomposition_Mapping, `symbols.mjs` shipped a second compressed copy of
the same data as `code-points.mjs`, differing only in that every code
point was replaced by its string. It now imports `code-points.mjs` and
derives the map through the new `mapping-to-symbols.mjs`. Small mappings
(fewer than 10 entries) keep their inline literals. The resulting maps
are identical, including entry order; a new test checks this for every
mapping directory.
For Unicode 18.0.0 this shrinks the package from 444 KB to 410 KB packed
(1.47 MB to 1.43 MB unpacked).
Assisted-By: Claude Fable 5.1
Issue: #109
codePointsFileContent=`import { brotliDecompressSync } from 'node:zlib';\n\nexport default ${brotliInline(codePoints)};\n`;
233
-
symbolsFileContent=`import { brotliDecompressSync } from 'node:zlib';\n\nexport default ${brotliInline(symbols)};\n`;
233
+
// The symbols map is derived from the code points map at runtime
234
+
// rather than shipped as a second copy of the same data.
235
+
symbolsFileContent=`import codePoints from './code-points.mjs';\nimport mappingToSymbols from '../../mapping-to-symbols.mjs';\n\nexport default mappingToSymbols(codePoints);\n`;
0 commit comments