import { existsSync, readFileSync } from "node:fs";
export function readJsonLines(path) {
    if (!existsSync(path)) {
        return [];
    }
    const content = readFileSync(path, "utf8").trim();
    if (!content) {
        return [];
    }
    return content
        .split("\n")
        .map((line) => line.trim())
        .filter(Boolean)
        .map((line) => JSON.parse(line));
}
//# sourceMappingURL=json-lines.js.map