mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore(cloudcmd) putout: apply-destructuring
This commit is contained in:
parent
ba5fee3f94
commit
b62984d540
35 changed files with 338 additions and 161 deletions
|
|
@ -84,7 +84,9 @@ function sendData(params, callback) {
|
|||
if (isMD)
|
||||
return markdown(p.name, p.request, callback);
|
||||
|
||||
const method = p.request.method;
|
||||
const {
|
||||
method
|
||||
} = p.request;
|
||||
|
||||
switch(method) {
|
||||
case 'GET':
|
||||
|
|
@ -179,7 +181,9 @@ function onPUT(name, body, callback) {
|
|||
|
||||
const from = root(files.from);
|
||||
const to = root(files.to);
|
||||
const names = files.names;
|
||||
const {
|
||||
names
|
||||
} = files;
|
||||
|
||||
if (!names)
|
||||
return fs.rename(from, to, fn);
|
||||
|
|
@ -193,7 +197,7 @@ function onPUT(name, body, callback) {
|
|||
|
||||
if (isRootAll([files.to, files.from]))
|
||||
return callback(getWin32RootMsg());
|
||||
|
||||
|
||||
files.from = root(files.from);
|
||||
files.to = root(files.to);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,15 @@
|
|||
|
||||
const format = require('format-io');
|
||||
|
||||
const version = require('../../package').version;
|
||||
const {
|
||||
version
|
||||
} = require('../../package');
|
||||
const config = require('../config');
|
||||
|
||||
const getMemory = () => {
|
||||
const rss = process.memoryUsage().rss;
|
||||
const {
|
||||
rss
|
||||
} = process.memoryUsage();
|
||||
return format.size(rss);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue