/** * Plain and simple utils for working with process environments. * * Exposes some often used constants and trivial functions. * * This module will *FAIL* to load in runtimes that don't have * a global `process` defined. * * @module */ import process from "node:process"; /** * credit goes to https://stackoverflow.com/questions/19275776/node-js-how-to-get-the-os-platforms-user-data-folder */ export const getUserDataDir = () => process.env.APPDATA || (process.platform == "darwin" ? process.env.HOME + "/Library/Preferences" : process.env.HOME + "/.local/share");