mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
8 lines
206 B
TypeScript
8 lines
206 B
TypeScript
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;
|
|
}
|