UNPKG

@boost/config

Version:

Powerful convention based finder, loader, and manager of both configuration and ignore files.

7 lines (5 loc) 202 B
import fs from 'node:fs'; import { json, Path } from '@boost/common'; export async function loadJson<T>(path: Path): Promise<T> { return json.parse(await fs.promises.readFile(path.path(), 'utf8')); }