MCPcopy Create free account
hub / github.com/WICG/webpackage / readHeaderOverridesFile

Function readHeaderOverridesFile

js/bundle/src/cli.ts:134–141  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

132}
133
134function readHeaderOverridesFile(path: string): unknown {
135 try {
136 const headerOverridesFile = fs.readFileSync(path, 'utf8');
137 return JSON.parse(headerOverridesFile);
138 } catch (error) {
139 throw new Error('Header overrides file contains invalid JSON.');
140 }
141}
142
143export function main() {
144 const options = readOptions();

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected