diff --git a/index.js b/index.js index caa8562..44c9e99 100644 --- a/index.js +++ b/index.js @@ -4,11 +4,9 @@ const isJpg = require('is-jpg'); const mozjpeg = require('mozjpeg'); module.exports = options => buffer => { - options = Object.assign({ - trellis: true, + options = {trellis: true, trellisDC: true, - overshoot: true - }, options); + overshoot: true, ...options}; if (!Buffer.isBuffer(buffer)) { return Promise.reject(new TypeError('Expected a buffer')); @@ -18,20 +16,6 @@ module.exports = options => buffer => { return Promise.resolve(buffer); } - // TODO: Remove these sometime far in the future - if (options.fastcrush) { - return Promise.reject(new Error('Option `fastcrush` was renamed to `fastCrush`')); - } - if (options.maxmemory) { - return Promise.reject(new Error('Option `maxmemory` was renamed to `maxMemory`')); - } - if (options.notrellis) { - return Promise.reject(new Error('Option `notrellis` was renamed to `trellis` and inverted')); - } - if (options.noovershoot) { - return Promise.reject(new Error('Option `noovershoot` was renamed to `overshoot` and inverted')); - } - const args = []; if (typeof options.quality !== 'undefined') {