Files
oh-my-opencode/packages/omo-codex/scripts/install/utils.mjs
T
2026-05-30 19:12:17 +09:00

16 lines
342 B
JavaScript

import { constants as fsConstants } from "node:fs";
import { access } from "node:fs/promises";
export async function exists(path) {
try {
await access(path, fsConstants.F_OK);
return true;
} catch {
return false;
}
}
export function isRecord(value) {
return typeof value === "object" && value !== null && !Array.isArray(value);
}