source: imaps-frontend/node_modules/es-abstract/operations/build-unicode.mjs

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 460 bytes
Line 
1import fs from 'fs';
2import path from 'path';
3
4import C from '@unicode/unicode-15.0.0/Case_Folding/C/symbols.js';
5import S from '@unicode/unicode-15.0.0/Case_Folding/S/symbols.js';
6
7function normalize(map) {
8 return Object.fromEntries(Array.from(map, ([o, i]) => [i, [].concat(o)[0]]));
9}
10
11const cases = {
12 C: normalize(C),
13 S: normalize(S),
14};
15
16fs.writeFileSync(
17 path.join(process.cwd(), './helpers/caseFolding.json'),
18 JSON.stringify(cases, null, '\t'),
19);
Note: See TracBrowser for help on using the repository browser.