Build prototype with Object.assign to allow minification (#1475)

This commit is contained in:
Julian Aubourg
2018-11-26 19:40:06 +01:00
committed by Lovell Fuller
parent d26ccf6294
commit 383b933e26
6 changed files with 7 additions and 19 deletions

View File

@@ -383,7 +383,7 @@ function linear (a, b) {
* @private
*/
module.exports = function (Sharp) {
[
Object.assign(Sharp.prototype, {
rotate,
flip,
flop,
@@ -399,7 +399,5 @@ module.exports = function (Sharp) {
threshold,
boolean,
linear
].forEach(function (f) {
Sharp.prototype[f.name] = f;
});
};