x-http-client
Version:
An http client to simplify sending requests (HTTP & JSONP) in the browser.
17 lines (13 loc) • 391 B
JavaScript
/**
* Make `SubClass` extend `SuperClass`.
*
* @param {Function} SubClass The sub class constructor.
* @param {Function} SuperClass The super class constructor.
*/
function inherits(SubClass, SuperClass) {
var F = function() {};
F.prototype = SuperClass.prototype;
SubClass.prototype = new F();
SubClass.prototype.constructor = SubClass;
}
module.exports = inherits;