I am a n00b in node, and find util.inherits()
very useful, except for the fact that it seems to replace the entire prototype of the original object. For instance:>
You should first inherit, after the function definition, and then implement your object. Also don't forget to call the superclass constructor in your class's constructor.
Function A(y){
this.y = x;
}
Function B(x,y){
this.x = x;
A.call(this,y);
}
util.inherits(B,A);
B.prototype.mythodA = function() {
//do something
}