UNPKG

dtp-tripwire-agent

Version:

A service for protecting your node against malicious attacks and scans.

9 lines (6 loc) 213 B
import fs from "node:fs"; async function readJsonFile<T>(path: string): Promise<T> { const file = await fs.promises.readFile(path); return JSON.parse(file.toString("utf-8")) as T; } export { readJsonFile };