chore(cloudcmd) putout: apply-destructuring

This commit is contained in:
coderaiser 2019-01-30 15:59:31 +02:00
parent ba5fee3f94
commit b62984d540
35 changed files with 338 additions and 161 deletions

View file

@ -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);

View file

@ -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);
};