1 if (typeof Object.create === 'function') {
2 // implementation from standard node.js 'util' module
3 module.exports = function inherits(ctor, superCtor) {
5 ctor.super_ = superCtor
6 ctor.prototype = Object.create(superCtor.prototype, {
17 // old school shim for old browsers
18 module.exports = function inherits(ctor, superCtor) {
20 ctor.super_ = superCtor
21 var TempCtor = function () {}
22 TempCtor.prototype = superCtor.prototype
23 ctor.prototype = new TempCtor()
24 ctor.prototype.constructor = ctor