function inherits(ctor, superCtor) {
    "use strict";
    ctor.super_ = ctor.__super__ = superCtor;
    ctor.prototype = Object.create(superCtor.prototype, {
        constructor: {
            value: ctor,
            enumerable: false,
            writable: true,
            configurable: true
        }
    });
}
Inherit the prototype methods from one constructor into another.

@param {function} ctor Constructor function which needs to inherit the
    prototype.
@param {function} superCtor Constructor function to inherit prototype from.