(xpath)
| 6 | } |
| 7 | |
| 8 | export function readCompressedJsonFile(xpath) { |
| 9 | if (!xpath.endsWith('.br')) { |
| 10 | xpath += '.br' |
| 11 | } |
| 12 | return JSON.parse(brotliDecompressSync(fs.readFileSync(xpath))) |
| 13 | } |
| 14 | |
| 15 | // Ask it to read a `foo.json` file and it will automatically |
| 16 | // first see if there's a `foo.json.br` and only if it's not, |
no outgoing calls
no test coverage detected