@softwareventures/maintain-project
Version:
Automatically create and maintain TypeScript projects with standard settings for Software Ventures Limited
12 lines • 669 B
JavaScript
import { isSuccess, mapResultFn } from "../result/result.js";
import { readProjectJson } from "./read-json.js";
export async function projectDevDependsOn(project, dependency) {
return readProjectJson(project, "package.json")
.then(mapResultFn(packageJson =>
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
typeof packageJson?.dependencies?.[dependency] === "string" ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
typeof packageJson?.devDependencies?.[dependency] === "string"))
.then(result => isSuccess(result) && result.value);
}
//# sourceMappingURL=dev-depends-on.js.map