Replace use of deprecated util.inherits

This commit is contained in:
Lovell Fuller 2021-09-21 11:03:28 +01:00
parent 2679bb567b
commit bbf612cb9e

View File

@ -288,7 +288,8 @@ const Sharp = function (input, options) {
this.options.input = this._createInputDescriptor(input, options, { allowStream: true });
return this;
};
util.inherits(Sharp, stream.Duplex);
Object.setPrototypeOf(Sharp.prototype, stream.Duplex.prototype);
Object.setPrototypeOf(Sharp, stream.Duplex);
/**
* Take a "snapshot" of the Sharp instance, returning a new instance.