Skip to content

Commit

Permalink
Replace use of deprecated util.inherits
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Sep 22, 2021
1 parent 2679bb5 commit bbf612c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit bbf612c

Please sign in to comment.