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 | |
---|
1 | import fs from 'fs';
|
---|
2 | import path from 'path';
|
---|
3 |
|
---|
4 | import C from '@unicode/unicode-15.0.0/Case_Folding/C/symbols.js';
|
---|
5 | import S from '@unicode/unicode-15.0.0/Case_Folding/S/symbols.js';
|
---|
6 |
|
---|
7 | function normalize(map) {
|
---|
8 | return Object.fromEntries(Array.from(map, ([o, i]) => [i, [].concat(o)[0]]));
|
---|
9 | }
|
---|
10 |
|
---|
11 | const cases = {
|
---|
12 | C: normalize(C),
|
---|
13 | S: normalize(S),
|
---|
14 | };
|
---|
15 |
|
---|
16 | fs.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.