UNPKG

repoify-js

Version:

Repoify is a custom-built Version Control System (VCS) created as a fun learning project to explore core concepts of version control, file management, and cloud storage integration using modern technologies.

15 lines (12 loc) 434 B
import { fsAsync, filePath } from "../utils/fileUtils.js"; /*************************** ISLOGGEDIN ***************************/ const COOKIE_PATH = filePath.resolve(process.cwd(), ".repoify_cookies.json"); const isLoggedIn = async () => { try { const cookies = await fsAsync.readFile(COOKIE_PATH, "utf-8"); return cookies ? true : false; } catch (error) { return false; } }; export { isLoggedIn };