Spaces:
Configuration error
Configuration error
File size: 460 Bytes
5641073 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import fs from 'fs';
import path from 'path';
import C from '@unicode/unicode-15.0.0/Case_Folding/C/symbols.js';
import S from '@unicode/unicode-15.0.0/Case_Folding/S/symbols.js';
function normalize(map) {
return Object.fromEntries(Array.from(map, ([o, i]) => [i, [].concat(o)[0]]));
}
const cases = {
C: normalize(C),
S: normalize(S),
};
fs.writeFileSync(
path.join(process.cwd(), './helpers/caseFolding.json'),
JSON.stringify(cases, null, '\t'),
);
|