format: prettify entire project

This commit is contained in:
Rim
2025-04-02 06:50:39 -04:00
parent 86f0782a98
commit 7ccc0be712
1711 changed files with 755867 additions and 235931 deletions

View File

@ -10,7 +10,8 @@ const { LDD_PATH, readFile, readFileSync } = require('./filesystem');
let cachedFamilyFilesystem;
let cachedVersionFilesystem;
const command = 'getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true';
const command =
'getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true';
let commandOut = '';
const safeCommand = () => {
@ -158,7 +159,7 @@ const familySync = () => {
* Resolves `true` only when the platform is Linux and the libc family is not `glibc`.
* @returns {Promise<boolean>}
*/
const isNonGlibcLinux = async () => isLinux() && await family() !== GLIBC;
const isNonGlibcLinux = async () => isLinux() && (await family()) !== GLIBC;
/**
* Returns `true` only when the platform is Linux and the libc family is not `glibc`.
@ -263,5 +264,5 @@ module.exports = {
isNonGlibcLinux,
isNonGlibcLinuxSync,
version,
versionSync
versionSync,
};

View File

@ -24,18 +24,19 @@ const readFileSync = (path) => fs.readFileSync(path, 'utf-8');
* @param {string} path
* @returns {Promise<string>}
*/
const readFile = (path) => new Promise((resolve, reject) => {
fs.readFile(path, 'utf-8', (err, data) => {
if (err) {
reject(err);
} else {
resolve(data);
}
const readFile = (path) =>
new Promise((resolve, reject) => {
fs.readFile(path, 'utf-8', (err, data) => {
if (err) {
reject(err);
} else {
resolve(data);
}
});
});
});
module.exports = {
LDD_PATH,
readFileSync,
readFile
readFile,
};