mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Build prototype with Object.assign to allow minification (#1475)
This commit is contained in:
committed by
Lovell Fuller
parent
d26ccf6294
commit
383b933e26
@@ -123,7 +123,7 @@ function _setColourOption (key, val) {
|
||||
* @private
|
||||
*/
|
||||
module.exports = function (Sharp) {
|
||||
[
|
||||
Object.assign(Sharp.prototype, {
|
||||
// Public
|
||||
tint,
|
||||
greyscale,
|
||||
@@ -132,8 +132,6 @@ module.exports = function (Sharp) {
|
||||
toColorspace,
|
||||
// Private
|
||||
_setColourOption
|
||||
].forEach(function (f) {
|
||||
Sharp.prototype[f.name] = f;
|
||||
});
|
||||
// Class attributes
|
||||
Sharp.colourspace = colourspace;
|
||||
|
||||
Reference in New Issue
Block a user