Initial import

This commit is contained in:
2025-11-05 20:35:04 +01:00
commit 5b1fd847c2
4586 changed files with 685044 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
var os = require('os');
var path = require('path');
var userHome = os.homedir();
var env = process.env;
var name = 'js-v8flags';
function macos() {
var library = path.join(userHome, 'Library');
return path.join(library, 'Caches', name);
}
function windows() {
var appData = env.LOCALAPPDATA || path.join(userHome, 'AppData', 'Local');
return path.join(appData, name);
}
// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
function linux() {
return path.join(env.XDG_CACHE_HOME || path.join(userHome, '.cache'), name);
}
module.exports = function (platform) {
if (!userHome) {
return os.tmpdir();
}
if (platform === 'darwin') {
return macos();
}
if (platform === 'win32') {
return windows();
}
return linux();
};