MCPcopy Index your code
hub / github.com/github/docs / readJsonFile

Function readJsonFile

lib/read-json-file.js:4–6  ·  view source on GitHub ↗
(xpath)

Source from the content-addressed store, hash-verified

2import { brotliDecompressSync } from 'zlib'
3
4export default function readJsonFile(xpath) {
5 return JSON.parse(fs.readFileSync(xpath, 'utf8'))
6}
7
8export function readCompressedJsonFile(xpath) {
9 if (!xpath.endsWith('.br')) {

Calls

no outgoing calls

Tested by

no test coverage detected