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

Function parseFile

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

Source from the content-addressed store, hash-verified

238}
239
240async function parseFile(
241 filepath: string | URL,
242): Promise<Record<string, string>> {
243 try {
244 return parse(await Deno.readTextFile(filepath));
245 } catch (e) {
246 if (e instanceof Deno.errors.NotFound) return {};
247 throw e;
248 }
249}

Callers 1

loadFunction · 0.85

Calls 1

parseFunction · 0.90

Tested by

no test coverage detected