implements querystring transformation #928

Merged
jessopb merged 1 commit from xformFileOnServe into master 2019-02-21 23:57:00 +01:00
5 changed files with 555 additions and 399 deletions

802
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -46,6 +46,7 @@
"express-http-context": "^1.2.0",
"generate-password": "^1.4.1",
"get-video-dimensions": "^1.0.0",
"gm": "^1.23.1",
"helmet": "^3.15.0",
"image-size": "^0.6.3",
"inquirer": "^5.2.0",

View file

@ -15,9 +15,20 @@ const BLOCKED_CLAIM = 'BLOCKED_CLAIM';
const NO_FILE = 'NO_FILE';
const CONTENT_UNAVAILABLE = 'CONTENT_UNAVAILABLE';
const { publishing: { serveOnlyApproved, approvedChannels } } = require('@config/siteConfig');
const {
publishing: { serveOnlyApproved, approvedChannels },
} = require('@config/siteConfig');
const getClaimIdAndServeAsset = (channelName, channelClaimId, claimName, claimId, originalUrl, ip, res, headers) => {
const getClaimIdAndServeAsset = (
channelName,
channelClaimId,
claimName,
claimId,
originalUrl,
ip,
res,
headers
) => {
getClaimId(channelName, channelClaimId, claimName, claimId)
.then(fullClaimId => {
claimId = fullClaimId;
@ -39,19 +50,27 @@ const getClaimIdAndServeAsset = (channelName, channelClaimId, claimName, claimId
.then(claim => {
let claimDataValues = claim.dataValues;
if (serveOnlyApproved && !isApprovedChannel({ longId: claimDataValues.publisher_id || claimDataValues.certificateId }, approvedChannels)) {
if (
serveOnlyApproved &&
!isApprovedChannel(
{ longId: claimDataValues.publisher_id || claimDataValues.certificateId },
approvedChannels
)
) {
throw new Error(CONTENT_UNAVAILABLE);
}
let outpoint = claimDataValues.outpoint || `${claimDataValues.transaction_hash_id}:${claimDataValues.vout}`;
let outpoint =
claimDataValues.outpoint ||
`${claimDataValues.transaction_hash_id}:${claimDataValues.vout}`;
logger.debug('Outpoint:', outpoint);
return db.Blocked.isNotBlocked(outpoint).then(() => {
// If content was found, is approved, and not blocked - log a view.
if (headers && headers['user-agent'] && /LBRY/.test(headers['user-agent']) === false) {
db.Views.create({
time : Date.now(),
isChannel : false,
claimId : claimDataValues.claim_id || claimDataValues.claimId,
time: Date.now(),
isChannel: false,
claimId: claimDataValues.claim_id || claimDataValues.claimId,
publisherId: claimDataValues.publisher_id || claimDataValues.certificateId,
ip,
});
@ -70,7 +89,7 @@ const getClaimIdAndServeAsset = (channelName, channelClaimId, claimName, claimId
if (!fileRecord) {
throw NO_FILE;
}
serveFile(fileRecord.dataValues, res);
serveFile(fileRecord.dataValues, res, originalUrl);
})
.catch(error => {
if (error === NO_CLAIM) {
@ -98,7 +117,8 @@ const getClaimIdAndServeAsset = (channelName, channelClaimId, claimName, claimId
logger.debug('claim was blocked');
return res.status(451).json({
success: false,
message: 'In response to a complaint we received under the US Digital Millennium Copyright Act, we have blocked access to this content from our applications. For more details, see https://lbry.io/faq/dmca',
message:
'In response to a complaint we received under the US Digital Millennium Copyright Act, we have blocked access to this content from our applications. For more details, see https://lbry.io/faq/dmca',
});
}
if (error === NO_FILE) {

View file

@ -1,19 +1,46 @@
const logger = require('winston');
const transformImage = require('./transformImage');
const serveFile = async ({ filePath, fileType }, res, originalUrl) => {
const queryObject = {};
// TODO: replace quick/dirty try catch with better practice
try {
originalUrl
.split('?')[1]
.split('&')
.map(pair => {
if (pair.includes('=')) {
let parr = pair.split('=');
queryObject[parr[0]] = parr[1];
} else queryObject[pair] = true;
});
} catch (e) {}
const serveFile = ({ filePath, fileType }, res) => {
if (!fileType) {
logger.error(`no fileType provided for ${filePath}`);
}
let mediaType = fileType ? fileType.substr(0, fileType.indexOf('/')) : '';
const transform =
mediaType === 'image' && queryObject.hasOwnProperty('h') && queryObject.hasOwnProperty('w');
skhameneh commented 2019-02-20 19:15:33 +01:00 (Migrated from github.com)
Review

Can format like:

  const transform = (
    mediaType === 'image' && queryObject.hasOwnProperty('h') && queryObject.hasOwnProperty('w')
  );
Can format like: ``` const transform = ( mediaType === 'image' && queryObject.hasOwnProperty('h') && queryObject.hasOwnProperty('w') ); ```
const sendFileOptions = {
headers: {
'X-Content-Type-Options' : 'nosniff',
'Content-Type' : fileType,
'Access-Control-Allow-Origin' : '*',
'X-Content-Type-Options': 'nosniff',
'Content-Type': fileType,
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Type, Accept',
},
};
logger.debug(`fileOptions for ${filePath}:`, sendFileOptions);
if (transform) {
logger.debug(`transforming and sending file`);
let xformed = await transformImage(filePath, queryObject);
res.status(200).set(sendFileOptions.headers);
res.end(xformed, 'binary');
} else {
res.status(200).sendFile(filePath, sendFileOptions);
}
};
module.exports = serveFile;

View file

@ -0,0 +1,76 @@
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
const gm = require('gm');
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
const logger = require('winston');
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
const imageMagick = gm.subClass({ imageMagick: true });
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
const { getImageHeightAndWidth } = require('../../../utils/imageProcessing');
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
module.exports = function transformImage(path, queryObj) {
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
return new Promise((resolve, reject) => {
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
let { h: cHeight = null } = queryObj;
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
let { w: cWidth = null } = queryObj;
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
let { t: transform = null } = queryObj;
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
let { x: xOrigin = null } = queryObj;
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
let { y: yOrigin = null } = queryObj;
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
let oHeight,
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
oWidth = null;
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
try {
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
getImageHeightAndWidth(path).then(hwarr => {
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
oHeight = hwarr[0];
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
oWidth = hwarr[1];
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
// conditional logic here
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
if (transform === 'crop') {
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
resolve(_cropCenter(path, cWidth, cHeight, oWidth, oHeight));
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
} else if (transform === 'stretch') {
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
imageMagick(path)
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
.resize(cWidth, cHeight, '!')
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
.toBuffer(null, (err, buf) => {
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
resolve(buf);
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
});
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
} else {
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
// resize scaled
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
imageMagick(path)
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
.resize(cWidth, cHeight)
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
.toBuffer(null, (err, buf) => {
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
resolve(buf);
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
});
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
}
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
});
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
} catch (e) {
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
logger.error(e);
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
reject(e);
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
}
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
});
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
};
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
function _cropCenter(path, cropWidth, cropHeight, originalWidth, originalHeight) {
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
let oAspect = originalWidth / originalHeight;
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
let cAspect = cropWidth / cropHeight;
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
let resizeX,
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
resizeY,
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
xpoint,
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
ypoint = null;
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
if (oAspect >= cAspect) {
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
// if crop is narrower aspect than original
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
resizeY = cropHeight;
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
xpoint = (oAspect * cropHeight) / 2 - cropWidth / 2;
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
ypoint = 0;
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
} else {
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
// if crop is wider aspect than original
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
resizeX = cropWidth;
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
xpoint = 0;
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
ypoint = cropWidth / oAspect / 2 - cropHeight / 2;
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
}
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
return new Promise((resolve, reject) => {
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
try {
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
imageMagick(path)
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
.resize(resizeX, resizeY)
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
.crop(cropWidth, cropHeight, xpoint, ypoint)
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
.toBuffer(null, (err, buf) => {
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
resolve(buf);
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
});
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
} catch (e) {
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
logger.error(e);
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
reject(e);
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
}
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
});
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.
}
skhameneh commented 2019-02-20 19:16:39 +01:00 (Migrated from github.com)
Review

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

Can use a destructuring assignment, see https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
skhameneh commented 2019-02-20 19:17:02 +01:00 (Migrated from github.com)
Review

Can use await

Can use `await`
jessopb commented 2019-02-21 08:03:00 +01:00 (Migrated from github.com)
Review

I agree, but that's enough time spent on this feature for now.

I agree, but that's enough time spent on this feature for now.