We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Look at this question in StackOverflow.
A problem of util.inheits is that previous prototype get lost. I think it would be fine if we preserve it in inherits module.
I improved this anwser. What do you think?
var util = require('util'); module.exports = { inherits : function(sub, sup, proto) { if (typeof proto === 'undefined') { proto = sub.prototype; } util.inherits(sub, sup); Object.keys(proto).forEach(function(key) { sub.prototype[key] = proto[key]; }); } } };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Look at this question in StackOverflow.
A problem of util.inheits is that previous prototype get lost. I think it would be fine if we preserve it in inherits module.
I improved this anwser. What do you think?
The text was updated successfully, but these errors were encountered: