MCPcopy Create free account
hub / github.com/denoland/std / parseFileSync

Function parseFileSync

dotenv/mod.ts:288–297  ·  view source on GitHub ↗
(
  filepath: string | URL,
)

Source from the content-addressed store, hash-verified

286}
287
288function parseFileSync(
289 filepath: string | URL,
290): Record<string, string> {
291 try {
292 return parse(Deno.readTextFileSync(filepath));
293 } catch (e) {
294 if (e instanceof Deno.errors.NotFound) return {};
295 throw e;
296 }
297}
298
299async function parseFile(
300 filepath: string | URL,

Callers 1

loadSyncFunction · 0.85

Calls 1

parseFunction · 0.90

Tested by

no test coverage detected