UNPKG

nodobjc-x

Version:

The Node.js ⇆ Objective-C bridge

22 lines (15 loc) 696 B
module.exports = inherits; var setPrototypeOf = require('setprototypeof'); function inherits (ctor, superCtor) { if (ctor === undefined || ctor === null) throw new TypeError('The constructor to "inherits" must not be ' + 'null or undefined'); if (superCtor === undefined || superCtor === null) throw new TypeError('The super constructor to "inherits" must not ' + 'be null or undefined'); if (superCtor.prototype === undefined) throw new TypeError('The super constructor to "inherits" must ' + 'have a prototype'); ctor.super_ = superCtor; setPrototypeOf(ctor.prototype, superCtor.prototype); };