MCPcopy Create free account
hub / github.com/adobe/react-spectrum / readJsonSync

Function readJsonSync

scripts/migrateIntl.mjs:75–81  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

73}
74
75function readJsonSync(filePath) {
76 try {
77 return JSON.parse(fs.readFileSync(filePath, 'utf8'));
78 } catch (error) {
79 throw new Error(`Failed to read JSON from ${filePath}: ${error.message}`);
80 }
81}
82
83let rspIntlPackages = glob.sync('../packages/**/intl/en-US.json', {cwd: __dirname, absolute: true});
84let dest = path.join(__dirname, '../packages/@react-spectrum/s2/intl');

Callers 1

migrateIntl.mjsFile · 0.70

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected