MCPcopy
hub / github.com/BlueWallet/BlueWallet / buildEnSchema

Function buildEnSchema

scripts/clean-loc-strings.js:21–30  ·  view source on GitHub ↗
(en)

Source from the content-addressed store, hash-verified

19const SOURCE = 'en.json';
20
21function buildEnSchema(en) {
22 // Returns Map<section, Set<key>> reflecting en.json's structure.
23 const schema = new Map();
24 for (const sectionName of Object.keys(en)) {
25 const section = en[sectionName];
26 if (typeof section !== 'object' || section === null) continue;
27 schema.set(sectionName, new Set(Object.keys(section)));
28 }
29 return schema;
30}
31
32function cleanLocale(filePath, enSchema) {
33 const data = JSON.parse(fs.readFileSync(filePath, 'utf8'));

Callers 1

mainFunction · 0.85

Calls 2

keysMethod · 0.80
setMethod · 0.80

Tested by

no test coverage detected