UNPKG

@softwareventures/maintain-project

Version:

Automatically create and maintain TypeScript projects with standard settings for Software Ventures Limited

15 lines 488 B
import { failure, mapResultFn } from "../result/result.js"; import { readProjectText } from "./read-text.js"; export async function readProjectJson(project, path) { return readProjectText(project, path) .then(mapResultFn(JSON.parse)) .catch(reason => { if (reason instanceof SyntaxError) { return failure([{ type: "invalid-json", path }]); } else { throw reason; } }); } //# sourceMappingURL=read-json.js.map