Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Massage util.inherits for perf increase
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Jun 11, 2011
1 parent 37d529f commit 1ba2c32
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,11 @@ exports.pump = function(readStream, writeStream, callback) {
exports.inherits = function(ctor, superCtor) {
ctor.super_ = superCtor;
ctor.prototype = Object.create(superCtor.prototype, {
constructor: { value: ctor, enumerable: false }
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
};

0 comments on commit 1ba2c32

Please sign in to comment.