mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-11 03:36:11 +01: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;
|
|
}
|