UNPKG

eve

Version:

Filesystem-first framework for durable backend AI agents that run anywhere.

1 lines 322 B
import{isAbsolute,resolve}from"node:path";import{readFile}from"node:fs/promises";import matter from"#compiled/gray-matter/index.js";async function loadYaml(e){let t=await readFile(isAbsolute(e)?e:resolve(process.cwd(),e),`utf-8`);return matter(t.trimStart().startsWith(`---`)?t:`---\n${t}\n---`).data??{}}export{loadYaml};