mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
[TGUI] Added prettierx
This commit is contained in:
@@ -25,8 +25,7 @@ export class DreamSeeker {
|
||||
|
||||
topic(params = {}) {
|
||||
const query = Object.keys(params)
|
||||
.map(key => encodeURIComponent(key)
|
||||
+ '=' + encodeURIComponent(params[key]))
|
||||
.map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(params[key]))
|
||||
.join('&');
|
||||
return this.client.get('/dummy?' + query);
|
||||
}
|
||||
@@ -36,7 +35,7 @@ export class DreamSeeker {
|
||||
* @param {number[]} pids
|
||||
* @returns {DreamSeeker[]}
|
||||
*/
|
||||
DreamSeeker.getInstancesByPids = async pids => {
|
||||
DreamSeeker.getInstancesByPids = async (pids) => {
|
||||
if (process.platform !== 'win32') {
|
||||
return [];
|
||||
}
|
||||
@@ -46,8 +45,7 @@ DreamSeeker.getInstancesByPids = async pids => {
|
||||
const instance = instanceByPid.get(pid);
|
||||
if (instance) {
|
||||
instances.push(instance);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
pidsToResolve.push(pid);
|
||||
}
|
||||
}
|
||||
@@ -83,12 +81,10 @@ DreamSeeker.getInstancesByPids = async pids => {
|
||||
instances.push(instance);
|
||||
instanceByPid.set(pid, instance);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
} catch (err) {
|
||||
if (err.code === 'ERR_CHILD_PROCESS_STDIO_MAXBUFFER') {
|
||||
logger.error(err.message, err.code);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
logger.error(err);
|
||||
}
|
||||
return [];
|
||||
@@ -97,4 +93,4 @@ DreamSeeker.getInstancesByPids = async pids => {
|
||||
return instances;
|
||||
};
|
||||
|
||||
const plural = (word, n) => n !== 1 ? word + 's' : word;
|
||||
const plural = (word, n) => (n !== 1 ? word + 's' : word);
|
||||
|
||||
Reference in New Issue
Block a user