Files
blitzkit/packages/scripts/src/core/blitz/readYAML.ts
T

7 lines
206 B
TypeScript
Raw Normal View History

2024-01-21 16:23:44 -06:00
import { readFile } from 'fs/promises';
import { parse } from 'yaml';
export async function readYAML<Type>(file: string) {
const yaml = (await readFile(file)).toString();
return parse(yaml) as Type;
}